Skip to content
Snippets Groups Projects
Commit 88a0ef04 authored by juga's avatar juga
Browse files

docs: add logging examples to example configuration

parent 8cd30a30
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,28 @@ foo = on
[destinations.foo]
# the domain and path to the 1GB file.
url = https://example.com/does/not/exist.bin
## The following logging options are set by default.
## There is no need to change them unless other options are prefered.
; [logging]
; # Whether or not to log to a rotating file the directory paths.log_dname
; to_file = no
; # 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
; # Level to log at. Debug, info, warning, error, critical.
; level = info
; 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
; # 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
\ No newline at end of file
......@@ -109,14 +109,17 @@ to_file_max_bytes = 10485760
# never rotate the log file.
to_file_num_backups = 50
# Level to log at. Debug, info, warning, error, critical.
level = info
# `level` must be set to the lower of all the handler levels.
level = debug
to_file_level = debug
to_stdout_level = ${level}
to_syslog_level = ${level}
to_stdout_level = info
to_syslog_level = info
# Format string to use when logging
format = [%(asctime)s] [%(name)s] [%(levelname)s] %(message)s
format = %(module)s[%(process)s]: <%(levelname)s> %(message)s
# verbose formatter useful for debugging
to_file_format = %(asctime)s %(levelname)s %(threadName)s %(filename)s:%(lineno)s - %(funcName)s - %(message)s
# Not adding %(asctime)s to to stdout since it'll go to syslog when using
# systemd, and it'll have already the date.
to_stdout_format = ${format}
to_syslog_format = %(module)s[%(process)s]: <%(levelname)s> %(message)s
to_syslog_format = ${format}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment