From a776e46e6d014164986159d5ccf791520e226f49 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Fri, 15 Sep 2017 14:51:13 +0200 Subject: [PATCH] Add the command name in the log --- python/obitools3/apps/logging.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/obitools3/apps/logging.pyx b/python/obitools3/apps/logging.pyx index 406dbef..a389d05 100644 --- a/python/obitools3/apps/logging.pyx +++ b/python/obitools3/apps/logging.pyx @@ -22,7 +22,7 @@ cpdef getLogger(dict config): logfile= config[root]['log'] rootlogger = logging.getLogger() - logFormatter = logging.Formatter("%(asctime)s [%(levelname)-5.5s] %(message)s") + logFormatter = logging.Formatter("%%(asctime)s [%s : %%(levelname)-5.5s] %%(message)s" % config[root]['module']) stderrHandler = logging.StreamHandler(sys.stderr) stderrHandler.setFormatter(logFormatter)