[logging] Some cleanup and improved configuring using user config

This commit is contained in:
Ferdinand Thiessen 2021-11-16 13:43:19 +01:00
parent 0ef9d18ace
commit 45ed9219a4
2 changed files with 12 additions and 4 deletions

View File

@ -14,10 +14,15 @@ secret_key = "V3ryS3cr3t"
#domain = "flaschengeist.local"
[LOGGING]
# Uncomment to enable logging to a file
#file = "/tmp/flaschengeist-debug.log"
# You can override all settings from the logging.toml here
# E.g. override the formatters etc
#
# Logging level, possible: DEBUG INFO WARNING ERROR
level = "WARNING"
level = "DEBUG"
# Uncomment to enable logging to a file
# file = "/tmp/flaschengeist-debug.log"
# Uncomment to disable console logging
# console = False
[DATABASE]
# engine = "mysql" (default)

View File

@ -1,9 +1,12 @@
# This is the default flaschengeist logger configuration
# If you want to customize it, use the flaschengeist.toml
version = 1
disable_existing_loggers = false
[formatters]
[formatters.simple]
format = "%(asctime)s - %(name)s - %(message)s"
format = "%(asctime)s - %(name)s (%(levelname)s) - %(message)s"
[formatters.extended]
format = "%(asctime)s — %(filename)s - %(funcName)s - %(lineno)d - %(threadName)s - %(name)s — %(levelname)s — %(message)s"