forked from github/pelican
Force root logger to be of FatalLogger class
This enforces FatalLogger policy upon pelican plugins
that might contain codes such as:
import logging
log = logging.getLogger()
log.warning(...)
# or
logging.warning(...)
This commit is contained in:
parent
78edd878a3
commit
cd3048d4cf
1 changed files with 2 additions and 0 deletions
|
|
@ -165,6 +165,8 @@ class FatalLogger(LimitLogger):
|
|||
|
||||
|
||||
logging.setLoggerClass(FatalLogger)
|
||||
# force root logger to be of our preferred class
|
||||
logging.getLogger().__class__ = FatalLogger
|
||||
|
||||
|
||||
def supports_color():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue