mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Log critical as critical, not exception.
This prevents weird things from happening when log.critical is called in a non-except context. Typically it would result in either 'None' or the last exception being logged, neither of which is desirable.
This commit is contained in:
parent
951da38521
commit
b5622f874b
@ -53,7 +53,7 @@ class Logger(object):
|
||||
|
||||
|
||||
def critical(self, msg, *args, **kwargs):
|
||||
self.error_log.exception(msg, *args, **kwargs)
|
||||
self.error_log.critical(msg, *args, **kwargs)
|
||||
|
||||
def error(self, msg, *args, **kwargs):
|
||||
self.error_log.error(msg, *args, **kwargs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user