aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-07-09 19:08:08 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-07-09 19:08:08 -0400
commita83efe19256bf9d63a5039e7448155531cf56ee3 (patch)
tree76af8d90d19b2db051d2e2dca655dbaac97a68eb /grs/Log.py
parentgrs/__init__.py: import Rotator. (diff)
downloadgrss-a83efe19256bf9d63a5039e7448155531cf56ee3.tar.gz
grss-a83efe19256bf9d63a5039e7448155531cf56ee3.tar.bz2
grss-a83efe19256bf9d63a5039e7448155531cf56ee3.zip
grs/Rotator.py: document and improve.
Diffstat (limited to 'grs/Log.py')
-rw-r--r--grs/Log.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/grs/Log.py b/grs/Log.py
index 201eeb9..5a87a92 100644
--- a/grs/Log.py
+++ b/grs/Log.py
@@ -26,8 +26,6 @@ class Log(Rotator):
f.write('%s\n' % msg)
- def rotate_logs(self):
- self.rotate(self.logfile)
- if os.path.isfile(self.logfile):
- shutil.move(self.logfile, '%s.0' % self.logfile)
+ def rotate_logs(self, upper_limit = 20):
+ self.full_rotate(self.logfile, upper_limit=upper_limit)
open('%s' % self.logfile, 'a').close()