From 65f713df4bc88b944869b18c79117294eeae13f6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 4 Feb 2005 05:59:07 +0000 Subject: [PATCH] Removed log.verbose. I never liked it anyway. --- plugins/Services/plugin.py | 2 -- scripts/supybot-test | 2 +- src/callbacks.py | 4 ---- src/log.py | 11 ++--------- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/plugins/Services/plugin.py b/plugins/Services/plugin.py index 1755466ff..bd6a2c5e2 100644 --- a/plugins/Services/plugin.py +++ b/plugins/Services/plugin.py @@ -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() diff --git a/scripts/supybot-test b/scripts/supybot-test index b4f80dc0b..3411387de 100644 --- a/scripts/supybot-test +++ b/scripts/supybot-test @@ -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 diff --git a/src/callbacks.py b/src/callbacks.py index a951cc337..4cf84c694 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -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): diff --git a/src/log.py b/src/log.py index a2eb02ae6..2d6bf4882 100644 --- a/src/log.py +++ b/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