When using make_filtering_bound_logger, one of the pre-created BoundLoggerFilteringAt<level> instances is used. These instances have the fatal & afatal aliases mapped^1 to error & aerror respectively, even though the Python fatal alias is mapped to critical in other loggers (including the Python standard library).
(Side note: After diving into structlog internals to figure out why my fatal logs were not going through the processor chain, I figured out that use of the fatal method is discouraged^2)
import structlog, logging
print(structlog.__version__) # 24.4.0
structlog.configure(wrapper_class=structlog.make_filtering_bound_logger(logging.CRITICAL))
structlog.get_logger().critical("something went critically wrong") # [critical ] something went critically wrong
structlog.get_logger().fatal("something went fatally wrong") # Log filtered
yeah while working on #670, I noticed fatal is not mentioned in the logging docs at all.
Since people shouldn't be using it and moving it to critical means that the only side effect are potentially more logs, I think this is fine to change. → #677
When using
make_filtering_bound_logger
, one of the pre-createdBoundLoggerFilteringAt<level>
instances is used. These instances have thefatal
&afatal
aliases mapped^1 toerror
&aerror
respectively, even though the Pythonfatal
alias is mapped tocritical
in other loggers (including the Python standard library).(Side note: After diving into structlog internals to figure out why my fatal logs were not going through the processor chain, I figured out that use of the
fatal
method is discouraged^2)