aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-09-29 16:29:12 +0800
committerAaron LI <aaronly.me@outlook.com>2016-09-29 16:29:12 +0800
commitb95f5c7b4941bf32cf5ea712db421bca41360ce0 (patch)
tree87890b617eb1b9fe5b7e672b5f4eca3c9de711b9
parentf683419a38cd936b26cddecc7ee992dd71b6a700 (diff)
downloadfg21sim-b95f5c7b4941bf32cf5ea712db421bca41360ce0.tar.bz2
configs/manager.py: Add "filemode" to the logging dict
-rw-r--r--fg21sim/configs/manager.py4
1 files changed, 3 insertions, 1 deletions
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