mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +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):
|
class IrcLogLevel(log.LogLevel):
|
||||||
"""Value must be one of INFO, WARNING, ERROR, or CRITICAL."""
|
"""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):
|
def setValue(self, v):
|
||||||
if v <= logging.DEBUG:
|
if v <= logging.DEBUG:
|
||||||
self.error()
|
self.error()
|
||||||
else:
|
else:
|
||||||
log.LogLevel.setValue(self, v)
|
log.LogLevel.setValue(self, v)
|
||||||
_ircHandler.setLevel(v)
|
|
||||||
|
|
||||||
class ValidChannelOrNick(registry.String):
|
class ValidChannelOrNick(registry.String):
|
||||||
"""Value must be a valid channel or a valid nick."""
|
"""Value must be a valid channel or a valid nick."""
|
||||||
|
Loading…
Reference in New Issue
Block a user