Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit 67a3fdb

Browse files
committed
Allow editing of log_record in two possible ways
This change allows a subclass to either modify the given log_record in process_log_record or to compute a new dictionary and return that instead.
1 parent efd73fa commit 67a3fdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pythonjsonlogger/jsonlogger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def format(self, record):
119119
log_record = {}
120120

121121
self.add_fields(log_record, record, message_dict)
122-
self.process_log_record(log_record)
122+
log_record = self.process_log_record(log_record)
123123

124124
return "%s%s" % (self.prefix,
125125
json.dumps(log_record,

0 commit comments

Comments
 (0)