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 should handle dates better #10
#8 fixes the exception that can happen when you log objects. What'd be even nicer, as @jezdez pointed out, would be to handle datetimes/dates : currently they are serialized as "datetime.datetime(2017, 4, 6, 9, 27, 7, 479427)" because that's the repr() for a datetime object, but we could do better by using DjangoJSONEncoder, which knows how to handle those objects and more.
One problem with that approach: at the moment src/dockerflow/logging.py is generic, does not depend on django. Not sure how to refactor that in a clean way.
@diox Oh, we'd have to ship an own encoder, literally just copy/pasting from Django. I think I've seen similar encoders in non-Django projects, so no huge problem.
Activity
diox commentedon Apr 6, 2017
One problem with that approach: at the moment
src/dockerflow/logging.pyis generic, does not depend on django. Not sure how to refactor that in a clean way.jezdez commentedon Apr 6, 2017
@diox Oh, we'd have to ship an own encoder, literally just copy/pasting from Django. I think I've seen similar encoders in non-Django projects, so no huge problem.