aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/configs
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-09-29 10:53:27 +0800
committerAaron LI <aaronly.me@outlook.com>2016-09-29 10:53:27 +0800
commitb73d8b844a33f517d30cbced35d49f8140425e93 (patch)
treeab3a9cbd37ac9a87570cb0a006b23f8ecdb06d65 /fg21sim/configs
parentaa5842cf42a58ad28aa371384400325fc1bafe53 (diff)
downloadfg21sim-b73d8b844a33f517d30cbced35d49f8140425e93.tar.bz2
configs: Add default config spec for logging
Diffstat (limited to 'fg21sim/configs')
-rw-r--r--fg21sim/configs/00-general.conf.spec34
1 files changed, 34 insertions, 0 deletions
diff --git a/fg21sim/configs/00-general.conf.spec b/fg21sim/configs/00-general.conf.spec
new file mode 100644
index 0000000..2c422bb
--- /dev/null
+++ b/fg21sim/configs/00-general.conf.spec
@@ -0,0 +1,34 @@
+# Configurations for "fg21sim"
+# -*- mode: conf -*-
+#
+# Syntax: `ConfigObj`, https://github.com/DiffSK/configobj
+#
+# This file contains the general configurations, which control the general
+# behaviors, or will be used in other configuration sections.
+
+[logging]
+# 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
+# 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
+# perform some function.
+# CRITICAL: A serious error, indicating that the program itself may be unable
+# to continue running.
+level = option("DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL", default="INFO")
+
+# Set the format of displayed messages
+format = string(default="%(asctime)s %(name)-12s %(levelname)-8s %(message)s")
+
+# Set the date/time format in messages (default: ISO8601)
+datefmt = string(default="%Y-%m-%dT%H:%M:%S")
+
+# Set the logging filename (will create a `FileHandler`)
+filename = string(default="")
+# Set the mode to open the above logging file
+filemode = option("w", "a", default="a")
+
+# Set the stream used to initialize the `StreamHandler`
+stream = option("stderr", "stdout", "", default="stderr")