mirror of
https://github.com/sprockets/sprockets.logging.git
synced 2024-11-21 19:28:35 +00:00
Merge pull request #6 from sprockets/fix-key-error-with-periodic-callbacks
Dont raise a KeyError when theres no request
This commit is contained in:
commit
e2e6c40c81
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ class JSONRequestFormatter(logging.Formatter):
|
|||
if not value:
|
||||
del output[key]
|
||||
if 'message' in output:
|
||||
del output['request']
|
||||
output.pop('request', None)
|
||||
return json.dumps(output)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue