diff options
Diffstat (limited to 'grs/Log.py')
-rw-r--r-- | grs/Log.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -12,13 +12,13 @@ from grs.Rotator import Rotator class Log(Rotator): """ Initilize logs, log messages, or rotate logs. """ - def __init__(self, logfile = CONST.LOGFILE): + def __init__(self, logfile=CONST.LOGFILE): self.logfile = logfile # Make sure the log directory exists os.makedirs(os.path.dirname(self.logfile), exist_ok=True) open(self.logfile, 'a').close() - def log(self, msg, stamped = True): + def log(self, msg, stamped=True): # If requested, stamp a log message with the unix time. if stamped: current_time = datetime.datetime.now(datetime.timezone.utc) @@ -28,7 +28,7 @@ class Log(Rotator): f.write('%s\n' % msg) - def rotate_logs(self, upper_limit = 20): + def rotate_logs(self, upper_limit=20): # Rotate all the previous logs self.full_rotate(self.logfile, upper_limit=upper_limit) open(self.logfile, 'a').close() |