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
StdlibFormatter inherits from logging.Formatter, but has a completely different constructor signature, making it incompatible with anything that takes the formatter class name.
Any time you pass "ecs_logging.StdlibFormatter" where a library takes a class name for a log formatter (Django, Gunicorn, etc.), it fails with the following error:
File "/usr/local/lib/python3.8/logging/config.py", line 71, in fileConfig
formatters = _create_formatters(cp)
File "/usr/local/lib/python3.8/logging/config.py", line 119, in _create_formatters
f = c(fs, dfs, stl)
TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given
The text was updated successfully, but these errors were encountered:
StdlibFormatter inherits from logging.Formatter, but has a completely different constructor signature, making it incompatible with anything that takes the formatter class name.
StdlibFormatter signature:
def __init__(self, stack_trace_limit=None, exclude_fields=()):
logging.Formatter signature:
def __init__(self, fmt=None, datefmt=None, style='%', validate=True):
Any time you pass "ecs_logging.StdlibFormatter" where a library takes a class name for a log formatter (Django, Gunicorn, etc.), it fails with the following error:
The text was updated successfully, but these errors were encountered: