We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5343858 commit 039f1cdCopy full SHA for 039f1cd
json_log_formatter/__init__.py
@@ -67,7 +67,14 @@ def format(self, record):
67
# argument passed in.
68
if mutated_record is None:
69
mutated_record = json_record
70
- return self.json_lib.dumps(mutated_record)
+ return self.to_json(mutated_record)
71
+
72
+ def to_json(self, record):
73
+ """Convert record dict to a json string
74
75
+ Override this method to change the way dict is converted to JSON.
76
+ """
77
+ return self.json_lib.dumps(record)
78
79
def extra_from_record(self, record):
80
"""Returns `extra` dict you passed to logger.
0 commit comments