mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
exception is set with direct set of key which is faster and expplicit
This commit is contained in:
parent
7a3e0b54c2
commit
44e0fcba33
1 changed files with 6 additions and 7 deletions
|
|
@ -232,13 +232,12 @@ class PypeMongoFormatter(logging.Formatter):
|
|||
}
|
||||
# Standard document decorated with exception info
|
||||
if record.exc_info is not None:
|
||||
document.update({
|
||||
'exception': {
|
||||
'message': str(record.exc_info[1]),
|
||||
'code': 0,
|
||||
'stackTrace': self.formatException(record.exc_info)
|
||||
}
|
||||
})
|
||||
document['exception'] = {
|
||||
'message': str(record.exc_info[1]),
|
||||
'code': 0,
|
||||
'stackTrace': self.formatException(record.exc_info)
|
||||
}
|
||||
|
||||
# Standard document decorated with extra contextual information
|
||||
if len(self.DEFAULT_PROPERTIES) != len(record.__dict__):
|
||||
contextual_extra = set(record.__dict__).difference(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue