mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fixed LogToIrc overriding default log level.
This commit is contained in:
parent
44899740a6
commit
4a5380b4f7
@ -132,12 +132,19 @@ _ircHandler.setFormatter(_ircFormatter)
|
||||
|
||||
class IrcLogLevel(log.LogLevel):
|
||||
"""Value must be one of INFO, WARNING, ERROR, or CRITICAL."""
|
||||
def set(self, s):
|
||||
s = s.upper()
|
||||
try:
|
||||
self.setValue(getattr(logging, s))
|
||||
_ircHandler.setLevel(self.value)
|
||||
except AttributeError:
|
||||
self.error()
|
||||
|
||||
def setValue(self, v):
|
||||
if v <= logging.DEBUG:
|
||||
self.error()
|
||||
else:
|
||||
log.LogLevel.setValue(self, v)
|
||||
_ircHandler.setLevel(v)
|
||||
|
||||
class ValidChannelOrNick(registry.String):
|
||||
"""Value must be a valid channel or a valid nick."""
|
||||
|
Loading…
Reference in New Issue
Block a user