diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2010-08-30 18:31:13 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2010-08-30 18:31:13 (GMT) |
commit | 609364a9898ef63e26be191cb092f0d37ab95340 (patch) | |
tree | b60e9fbb773799fa26cbd8c9fa39bfb46e52dc1d /Lib/logging/handlers.py | |
parent | 8b7da623ceb1e37d757cef95204c2384e1044a44 (diff) | |
download | cpython-609364a9898ef63e26be191cb092f0d37ab95340.zip cpython-609364a9898ef63e26be191cb092f0d37ab95340.tar.gz cpython-609364a9898ef63e26be191cb092f0d37ab95340.tar.bz2 |
Logging: removed some old commented out code.
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r-- | Lib/logging/handlers.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 906df16..332aefc 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -125,7 +125,6 @@ class RotatingFileHandler(BaseRotatingHandler): sfn = "%s.%d" % (self.baseFilename, i) dfn = "%s.%d" % (self.baseFilename, i + 1) if os.path.exists(sfn): - #print "%s -> %s" % (sfn, dfn) if os.path.exists(dfn): os.remove(dfn) os.rename(sfn, dfn) @@ -133,7 +132,6 @@ class RotatingFileHandler(BaseRotatingHandler): if os.path.exists(dfn): os.remove(dfn) os.rename(self.baseFilename, dfn) - #print "%s -> %s" % (self.baseFilename, dfn) self.mode = 'w' self.stream = self._open() @@ -283,7 +281,6 @@ class TimedRotatingFileHandler(BaseRotatingHandler): t = int(time.time()) if t >= self.rolloverAt: return 1 - #print "No need to rollover: %d, %d" % (t, self.rolloverAt) return 0 def getFilesToDelete(self): @@ -330,14 +327,8 @@ class TimedRotatingFileHandler(BaseRotatingHandler): os.remove(dfn) os.rename(self.baseFilename, dfn) if self.backupCount > 0: - # find the oldest log file and delete it - #s = glob.glob(self.baseFilename + ".20*") - #if len(s) > self.backupCount: - # s.sort() - # os.remove(s[0]) for s in self.getFilesToDelete(): os.remove(s) - #print "%s -> %s" % (self.baseFilename, dfn) self.mode = 'w' self.stream = self._open() currentTime = int(time.time()) @@ -783,7 +774,7 @@ class SysLogHandler(logging.Handler): prio = '<%d>' % self.encodePriority(self.facility, self.mapPriority(record.levelname)) prio = prio.encode('utf-8') - #Message is a string. Convert to bytes as required by RFC 5424 + # Message is a string. Convert to bytes as required by RFC 5424 msg = msg.encode('utf-8') if codecs: msg = codecs.BOM_UTF8 + msg |