diff options
author | 2018-07-05 08:29:01 -0700 | |
---|---|---|
committer | 2018-07-06 22:22:13 -0700 | |
commit | a7e1d29148a3e2a2718db101797383b79f2adda6 (patch) | |
tree | 10903c06e8e00fcbb9af7ca85f156e85b122e91e | |
parent | gkeys keyhandler: Additional debug logging (diff) | |
download | gentoo-keys-a7e1d29148a3e2a2718db101797383b79f2adda6.tar.gz gentoo-keys-a7e1d29148a3e2a2718db101797383b79f2adda6.tar.bz2 gentoo-keys-a7e1d29148a3e2a2718db101797383b79f2adda6.zip |
gkeys log.py: Reduce the frequency of new log files, add a timestamp message
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
-rw-r--r-- | gkeys/gkeys/log.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gkeys/gkeys/log.py b/gkeys/gkeys/log.py index 4ea5cb1..6916d97 100644 --- a/gkeys/gkeys/log.py +++ b/gkeys/gkeys/log.py @@ -51,7 +51,7 @@ def set_logger(namespace=None, logpath='', level=None, ensure_dirs(logpath, mode=dirmode, fatal=True) os.umask(filemask) logname = os.path.join(logpath, - '%s-%s.log' % (namespace, time.strftime('%Y%m%d-%H:%M'))) + '%s-%s.log' % (namespace, time.strftime('%Y%m%d-%H'))) file_handler = logging.FileHandler(logname) if level: file_handler.setLevel(log_levels[level]) @@ -66,7 +66,7 @@ def set_logger(namespace=None, logpath='', level=None, #Console_handler.setFormatter(formatter) logger.addHandler(Console_handler) #print "File logger suppose to be initialized", logger, Console_handler - logger.debug("Loggers initialized") + logger.debug("==== Loggers initialized ==== time: %s", time.strftime('%Y%m%d-%H:%M:%S') ) return logger |