Commit 8cd30a30 authored by juga's avatar juga
Browse files

config: change default logging levels and formats

And document that when sbws is launched by systemd the stdandard
output will go to journal and syslog.
Set default level to debug when logging to file and a more
verbose format.
Operators don't usually want to see the debug log in the stdout
or syslog, but they can see it in the file.
parent c2b85b3f
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -94,10 +94,12 @@ min_relays = 50

[logging]
# Whether or not to log to a rotating file the directory paths.log_dname
to_file = no
to_file = yes
# Whether or not to log to stdout
to_stdout = yes
# Whether or not to log to syslog
# NOTE that when sbws is launched by systemd, stdout goes to journal and
# syslog.
to_syslog = no
# If logging to file, how large (in bytes) should the file be allowed to get
# before rotating to a new one. 10485760 is 10 MiB. If zero or number of
@@ -108,13 +110,13 @@ to_file_max_bytes = 10485760
to_file_num_backups = 50
# Level to log at. Debug, info, warning, error, critical.
level = info
to_file_level = ${level}
to_file_level = debug
to_stdout_level = ${level}
to_syslog_level = ${level}
# Format string to use when logging
format = [%(asctime)s] [%(name)s] [%(levelname)s] %(message)s
to_file_format = ${format}
# verbose formatter useful for debugging
to_file_format = %(asctime)s %(levelname)s %(threadName)s %(filename)s:%(lineno)s - %(funcName)s - %(message)s
to_stdout_format = ${format}
to_syslog_format = %(module)s[%(process)s]: <%(levelname)s> %(message)s
# verbose formatter useful for debugging
#format = %(asctime)s %(levelname)s %(threadName)s %(filename)s:%(lineno)s - %(funcName)s - %(message)s