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
The fact that LogRecord is defined as a type alias that is notlogging.LogRecord while logging.LogRecord is also thrown around (e.g. in add_fields) is very confusing.
I strongly advise to pick a different name for this to differentiate it from the logging class, for example LogDict. This is also a strong contender for v4 imo.
The text was updated successfully, but these errors were encountered:
This is a good proposal. Even when refactoring I had issues keeping track which type of object I was working with (which I why I ended up adding the type alias in the first place).
If we are making breaking changes it might be worth changing some of the arguments as well so it's clear what is what. Maybe log_dict + LogDict and record + logging.LogRecord.
The fact that
LogRecord
is defined as a type alias that is notlogging.LogRecord
whilelogging.LogRecord
is also thrown around (e.g. inadd_fields
) is very confusing.python-json-logger/src/pythonjsonlogger/core.py
Line 78 in e7761e5
I strongly advise to pick a different name for this to differentiate it from the logging class, for example
LogDict
. This is also a strong contender for v4 imo.The text was updated successfully, but these errors were encountered: