mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Converted supybot.log.minimumPriority to supybot.log.level.
This commit is contained in:
parent
da99f93d4a
commit
59d563f38a
@ -189,8 +189,8 @@ conf.supybot.directories.register('log', registry.String('logs', """Determines
|
|||||||
what directory the bot will store its logfiles in."""))
|
what directory the bot will store its logfiles in."""))
|
||||||
|
|
||||||
conf.supybot.registerGroup('log')
|
conf.supybot.registerGroup('log')
|
||||||
conf.supybot.log.register('minimumPriority', LogLevel(logging.INFO,
|
conf.supybot.log.register('level', LogLevel(logging.INFO,
|
||||||
"""Determines what the minimum priority logged will be. Valid values are
|
"""Determines what the minimum priority level logged will be. Valid values are
|
||||||
DEBUG, INFO, WARNING, ERROR, and CRITICAL, in order of increasing
|
DEBUG, INFO, WARNING, ERROR, and CRITICAL, in order of increasing
|
||||||
priority."""))
|
priority."""))
|
||||||
conf.supybot.log.register('timestampFormat',
|
conf.supybot.log.register('timestampFormat',
|
||||||
@ -229,7 +229,7 @@ _handler = BetterFileHandler(os.path.join(conf.supybot.directories.log(),
|
|||||||
_handler.setFormatter(formatter)
|
_handler.setFormatter(formatter)
|
||||||
_handler.setLevel(-1)
|
_handler.setLevel(-1)
|
||||||
_logger.addHandler(_handler)
|
_logger.addHandler(_handler)
|
||||||
_logger.setLevel(conf.supybot.log.minimumPriority())
|
_logger.setLevel(conf.supybot.log.level())
|
||||||
|
|
||||||
if conf.supybot.log.stdout():
|
if conf.supybot.log.stdout():
|
||||||
_stdoutHandler = BetterStreamHandler(sys.stdout)
|
_stdoutHandler = BetterStreamHandler(sys.stdout)
|
||||||
|
Loading…
Reference in New Issue
Block a user