You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dockerflow.logging.JsonLogFormatter doesn't handle extra arguments that are not json-serializable #8
Enabling dockerflow.logging.JsonLogFormatter in your project can cause TypeError exceptions when extra, non json-serializable arguments are passed to the logging call.
>>>fromloggingimportgetLogger>>>getLogger('foo').warning('warning with extra info', extra={'something': object()})
Traceback (mostrecentcalllast):
(...)
TypeError: <objectobjectat0x7f5e88a54630>isnotJSONserializable
Yikes, that's a good call! I'm not sure if we should go a step further and use Django's datetime aware (and others) JSONEncoder subclass. But I'm happy to try things out with the repr first.
Activity
jezdez commentedon Apr 6, 2017
Yikes, that's a good call! I'm not sure if we should go a step further and use Django's datetime aware (and others) JSONEncoder subclass. But I'm happy to try things out with the repr first.
diox commentedon Apr 6, 2017
That's a good point. I was so focused on avoiding the exception that I didn't think about that. I'll file a new issue.