aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/configs
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-10-16 15:28:26 +0800
committerAaron LI <aly@aaronly.me>2017-10-16 15:28:26 +0800
commit008914cd9c10633e1f4d04770184fb3412e171b7 (patch)
tree3b809099b0ab75bbc51a28b88d41db43a8d3cd80 /fg21sim/configs
parent62a6a5a15a759da45cec210babbca52ca27a25b5 (diff)
downloadfg21sim-008914cd9c10633e1f4d04770184fb3412e171b7.tar.bz2
configs: remove "filemode" option
Diffstat (limited to 'fg21sim/configs')
-rw-r--r--fg21sim/configs/00-general.conf.spec4
-rw-r--r--fg21sim/configs/manager.py4
2 files changed, 2 insertions, 6 deletions
diff --git a/fg21sim/configs/00-general.conf.spec b/fg21sim/configs/00-general.conf.spec
index 8bd79de..3ecc822 100644
--- a/fg21sim/configs/00-general.conf.spec
+++ b/fg21sim/configs/00-general.conf.spec
@@ -127,7 +127,7 @@ ns = float(default=0.96, min=0.0)
# debug: Detailed information, typically of interest only when diagnosing
# problems.
# info: Confirmation that things are working as expected.
-# warning: An dinciation that something unexpected happended, or indicative
+# warning: An indication that something unexpected happended, or indicative
# of some problem in the near future (e.g., "disk space low").
# The software is still working as expected.
# error: Due to a more serious problem, the software has not been able to
@@ -145,8 +145,6 @@ datefmt = string(default="%H:%M:%S")
# Set the logging filename (will create a `FileHandler`)
# If set to "" (empty string), then the `FileHandler` will be disabled.
filename = string(default="")
-# Whether append messages to the above logging file instead of overwrite
-appendmode = boolean(default=True)
# Set the stream used to initialize the `StreamHandler`
# If set to "" (empty string), then the `StreamHandler` will be disabled.
diff --git a/fg21sim/configs/manager.py b/fg21sim/configs/manager.py
index 9b41b72..4143a8f 100644
--- a/fg21sim/configs/manager.py
+++ b/fg21sim/configs/manager.py
@@ -532,9 +532,8 @@ class ConfigManager:
if stream:
handlers.append(StreamHandler(getattr(sys, stream)))
logfile = conf["filename"]
- filemode = "a" if conf["appendmode"] else "w"
if logfile:
- handlers.append(FileHandler(logfile, mode=filemode))
+ handlers.append(FileHandler(logfile))
# Explicitly add the formatter to each handler
formatter = logging.Formatter(fmt=conf["format"],
@@ -546,7 +545,6 @@ class ConfigManager:
"level": getattr(logging, level),
"format": conf["format"],
"datefmt": conf["datefmt"],
- "filemode": filemode,
"handlers": handlers,
}
return logconf