[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [sbws/master] config: change default logging levels and formats



commit 8cd30a308bd2ad8481e5cc5b09dc15bd7462f1ff
Author: juga0 <juga@xxxxxxxxxx>
Date:   Sat Dec 8 18:17:00 2018 +0000

    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.
---
 sbws/config.default.ini | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sbws/config.default.ini b/sbws/config.default.ini
index 8abee3d..a2a929f 100644
--- a/sbws/config.default.ini
+++ b/sbws/config.default.ini
@@ -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
+



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits