mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Removed log.verbose. I never liked it anyway.
This commit is contained in:
parent
6580fc535f
commit
65f713df4b
@ -135,8 +135,6 @@ class Services(callbacks.Privmsg):
|
||||
disabled = self.registryValue('disabledNetworks')
|
||||
if irc.network in disabled or \
|
||||
irc.state.supported.get('NETWORK', '') in disabled:
|
||||
self.log.verbose('Ignoring message from %s, %s is disabled.',
|
||||
irc, irc.network)
|
||||
return
|
||||
self.__parent.__call__(irc, msg)
|
||||
nick = self._getNick()
|
||||
|
@ -48,7 +48,7 @@ supybot.directories.conf: test-conf
|
||||
supybot.directories.log: test-logs
|
||||
supybot.reply.whenNotCommand: True
|
||||
supybot.log.stdout: False
|
||||
supybot.log.level: VERBOSE
|
||||
supybot.log.level: DEBUG
|
||||
supybot.log.format: %(levelname)s %(message)s
|
||||
supybot.log.plugins.individualLogfiles: False
|
||||
supybot.protocols.irc.throttleTime: 0
|
||||
|
@ -546,7 +546,6 @@ _repr = repr
|
||||
class IrcObjectProxy(RichReplyMethods):
|
||||
"A proxy object to allow proper nested of commands (even threaded ones)."
|
||||
def __init__(self, irc, msg, args, nested=0):
|
||||
log.verbose('IrcObjectProxy.__init__: %s' % args)
|
||||
assert isinstance(args, list), 'Args should be a list, not a string.'
|
||||
self.irc = irc
|
||||
self.msg = msg
|
||||
@ -603,13 +602,10 @@ class IrcObjectProxy(RichReplyMethods):
|
||||
self.finalEval()
|
||||
|
||||
def _callTokenizedCommands(self):
|
||||
log.verbose('Calling tokenizedCommands.')
|
||||
for cb in self.irc.callbacks:
|
||||
if hasattr(cb, 'tokenizedCommand'):
|
||||
log.verbose('Trying to call %s.tokenizedCommand.', cb.name())
|
||||
self._callTokenizedCommand(cb)
|
||||
if self.msg.repliedTo:
|
||||
log.verbose('Done calling tokenizedCommands: %s.',cb.name())
|
||||
return
|
||||
|
||||
def _callTokenizedCommand(self, cb):
|
||||
|
11
src/log.py
11
src/log.py
@ -52,9 +52,6 @@ deadlyExceptions = [KeyboardInterrupt, SystemExit]
|
||||
###
|
||||
testing = False
|
||||
|
||||
VERBOSE = 1
|
||||
logging.addLevelName(VERBOSE, 'VERBOSE')
|
||||
|
||||
class Formatter(logging.Formatter):
|
||||
_fmtConf = staticmethod(lambda : conf.supybot.log.format())
|
||||
def formatTime(self, record, datefmt=None):
|
||||
@ -87,9 +84,6 @@ class Logger(logging.Logger):
|
||||
# The traceback should be sufficient if we want it.
|
||||
# self.error('Exception string: %s', eStrId)
|
||||
|
||||
def verbose(self, *args, **kwargs):
|
||||
self.log(VERBOSE, *args, **kwargs)
|
||||
|
||||
def _log(self, level, msg, args, exc_info=None):
|
||||
msg = format(msg, *args)
|
||||
logging.Logger._log(self, level, msg, (), exc_info=exc_info)
|
||||
@ -208,7 +202,7 @@ class ValidLogLevel(registry.String):
|
||||
return level
|
||||
|
||||
class LogLevel(ValidLogLevel):
|
||||
"""Invalid log level. Value must be either VERBOSE, DEBUG, INFO, WARNING,
|
||||
"""Invalid log level. Value must be either DEBUG, INFO, WARNING,
|
||||
ERROR, or CRITICAL."""
|
||||
def setValue(self, v):
|
||||
ValidLogLevel.setValue(self, v)
|
||||
@ -226,7 +220,7 @@ conf.registerGlobalValue(conf.supybot.log, 'format',
|
||||
its logging module."""))
|
||||
conf.registerGlobalValue(conf.supybot.log, 'level',
|
||||
LogLevel(logging.INFO, """Determines what the minimum priority level logged
|
||||
will be. Valid values are VERBOSE, DEBUG, INFO, WARNING, ERROR,
|
||||
will be. Valid values are DEBUG, INFO, WARNING, ERROR,
|
||||
and CRITICAL, in order of increasing priority."""))
|
||||
conf.registerGlobalValue(conf.supybot.log, 'statistics',
|
||||
ValidLogLevel(-1, """Determines what level statistics reporting
|
||||
@ -274,7 +268,6 @@ conf.registerGlobalValue(conf.supybot.log.plugins, 'format',
|
||||
|
||||
# These just make things easier.
|
||||
debug = _logger.debug
|
||||
verbose = _logger.verbose
|
||||
info = _logger.info
|
||||
warning = _logger.warning
|
||||
error = _logger.error
|
||||
|
Loading…
Reference in New Issue
Block a user