diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2015-07-09 19:08:08 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-07-09 19:08:08 -0400 |
commit | a83efe19256bf9d63a5039e7448155531cf56ee3 (patch) | |
tree | 76af8d90d19b2db051d2e2dca655dbaac97a68eb /grs/Log.py | |
parent | grs/__init__.py: import Rotator. (diff) | |
download | grss-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.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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() |