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 ca66a1a commit 139fd35Copy full SHA for 139fd35
json_logging/__init__.py
@@ -252,6 +252,7 @@ def format(self, record):
252
"logger": record.name,
253
"thread": record.threadName,
254
"level": record.levelname,
255
+ "line_no": record.lineno,
256
"module": record.module,
257
"msg": record.getMessage(),
258
}
@@ -305,7 +306,7 @@ def format(self, record):
305
306
if hasattr(record, 'props'):
307
json_log_object.update(record.props)
308
- if hasattr(record, 'exc_info') or hasattr(record, 'exc_text'):
309
+ if record.exc_info or record.exc_text:
310
json_log_object.update(self.get_exc_fields(record))
311
312
return JSON_SERIALIZER(json_log_object)
0 commit comments