Issue 37092: LoggerAdapter doesn't have fatal() like Logger (original) (raw)
Issue37092
Created on 2019-05-29 23:03 by Dave Johansen, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg343941 - (view) | Author: Dave Johansen (Dave Johansen) | Date: 2019-05-29 23:03 |
Using LoggerAdapter is a convenient way to add extra info to all logs, but it doesn't have the fatal() method like Logger, so it isn't a drop in replacement like it should be. | ||
msg344069 - (view) | Author: SilentGhost (SilentGhost) * ![]() |
Date: 2019-05-31 12:01 |
fatal is an undocumented feature, it's probably better not to use it in the first place. | ||
msg344080 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2019-05-31 15:21 |
FATAL and fatal() are synonyms for CRITICAL and critical(), and they are only around because of backward compatibility constraints on the Logger class at the time logging was added to Python. Because LoggerAdapter has no backward compatibility constraints, fatal() wasn't provided there - but critical() is, and can be used equivalently. Note that FATAL, fatal() are not documented as they are a legacy and not intended to be used - use CRITICAL and critical() instead. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:15 | admin | set | github: 81273 |
2019-05-31 15:21:12 | vinay.sajip | set | status: open -> closedresolution: not a bugmessages: + stage: resolved |
2019-05-31 12:01:53 | SilentGhost | set | nosy: + vinay.sajip, SilentGhostmessages: + versions: + Python 3.8 |
2019-05-29 23:03:42 | Dave Johansen | create |