From c09a7cace15a634d5831a3019faab0155e75dc6b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 15 Feb 2005 06:49:51 +0000 Subject: [PATCH] Removed log.stat, it was dumb. --- src/callbacks.py | 2 -- src/log.py | 9 --------- 2 files changed, 11 deletions(-) diff --git a/src/callbacks.py b/src/callbacks.py index 2d48cecd1..fcde60f37 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -340,7 +340,6 @@ def tokenize(s, channel=None): start = time.time() try: ret = Tokenizer(brackets=brackets,pipe=pipe,quotes=quotes).tokenize(s) - log.stat('tokenize took %s seconds.' % (time.time() - start)) return ret except ValueError, e: raise SyntaxError, str(e) @@ -1065,7 +1064,6 @@ class Commands(object): self.log.debug('Error return: %s', utils.gen.exnToString(e)) irc.error(str(e)) elapsed = time.time() - start - log.stat('%s took %s seconds', name, elapsed) def getCommandHelp(self, name): name = canonicalName(name) diff --git a/src/log.py b/src/log.py index 2d6bf4882..ef275cacf 100644 --- a/src/log.py +++ b/src/log.py @@ -222,11 +222,6 @@ conf.registerGlobalValue(conf.supybot.log, 'level', LogLevel(logging.INFO, """Determines what the minimum priority level logged 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 - is to be logged at. Mostly, this just includes, for instance, the time it - took to parse a message, process a command, etc. You probably don't care - about this.""")) conf.registerGlobalValue(conf.supybot.log, 'timestampFormat', registry.String('%Y-%m-%dT%H:%M:%S', """Determines the format string for timestamps in logfiles. Refer to the Python documentation for the time @@ -278,10 +273,6 @@ exception = _logger.exception registry.error = error registry.exception = exception -def stat(*args): - level = conf.supybot.log.statistics() - _logger.log(level, *args) - setLevel = _logger.setLevel atexit.register(logging.shutdown)