From b95f5c7b4941bf32cf5ea712db421bca41360ce0 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 29 Sep 2016 16:29:12 +0800 Subject: configs/manager.py: Add "filemode" to the logging dict --- fg21sim/configs/manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fg21sim/configs/manager.py b/fg21sim/configs/manager.py index fe85390..f5465a9 100644 --- a/fg21sim/configs/manager.py +++ b/fg21sim/configs/manager.py @@ -94,13 +94,15 @@ class ConfigManager: if stream: handlers.append(StreamHandler(getattr(sys, stream))) logfile = conf["filename"] + filemode = conf["filemode"] if logfile: - handlers.append(FileHandler(logfile, mode=conf["filemode"])) + handlers.append(FileHandler(logfile, mode=filemode)) # logconf = { "level": getattr(logging, conf["level"]), "format": conf["format"], "datefmt": conf["datefmt"], + "filemode": filemode, "handlers": handlers, } return logconf -- cgit v1.2.2