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

Commit 7cb0792

Browse files
author
Zakaria Zajac
authored
Merge pull request #40 from Mobivity/python2.6-test-fix
Fix Custom Logic Adds Field test for Python 2.6
2 parents 6c01e54 + 63f660b commit 7cb0792

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ class CustomJsonFormatter(jsonlogger.JsonFormatter):
147147

148148
def process_log_record(self, log_record):
149149
log_record["custom"] = "value"
150-
return super(CustomJsonFormatter, self).process_log_record(log_record)
150+
# Old Style "super" since Python 2.6's logging.Formatter is old
151+
# style
152+
return jsonlogger.JsonFormatter.process_log_record(self, log_record)
151153

152154
self.logHandler.setFormatter(CustomJsonFormatter())
153155
self.logger.info("message")

0 commit comments

Comments
 (0)