record traceback in error event

This commit is contained in:
jobevers 2017-02-11 13:47:45 -06:00
parent 5bf75ef139
commit 0674b48223
3 changed files with 8 additions and 0 deletions

View file

@ -11,6 +11,10 @@ at anytime.
### Changed ### Changed
* Remove unused upload_allowed option * Remove unused upload_allowed option
### Fixed
* add misssing traceback to logging
## [0.8.3] - 2017-02-15 ## [0.8.3] - 2017-02-15
### Fixed ### Fixed
* Get lbry files with pending claims * Get lbry files with pending claims

View file

@ -67,6 +67,7 @@ class Events(object):
'module': log_record.module, 'module': log_record.module,
'lineno': log_record.lineno, 'lineno': log_record.lineno,
'name': log_record.name, 'name': log_record.name,
'traceback': log_record.exc_text,
} }
return self._event('Error', properties) return self._event('Error', properties)

View file

@ -8,4 +8,7 @@ class Handler(logging.Handler):
logging.Handler.__init__(self, level) logging.Handler.__init__(self, level)
def emit(self, record): def emit(self, record):
# We need to call format to ensure that record.message and
# record.exc_text attributes are populated
self.format(record)
self.manager.send_error(record) self.manager.send_error(record)