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

[tor-commits] [sbws/master] docs: add note about syslog when running systemd



commit 0632a25023927bb5711f3554159394f2daebafb2
Author: juga0 <juga@xxxxxxxxxx>
Date:   Sat Dec 8 18:21:09 2018 +0000

    docs: add note about syslog when running systemd
    
    Closes bug #28761. Bugfix v0.6.0
---
 docs/source/examples/sbws.example.ini | 15 +++++++++------
 docs/source/man_sbws.ini.rst          |  2 ++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/docs/source/examples/sbws.example.ini b/docs/source/examples/sbws.example.ini
index 7155e66..cf6ff79 100644
--- a/docs/source/examples/sbws.example.ini
+++ b/docs/source/examples/sbws.example.ini
@@ -16,7 +16,7 @@ url = https://example.com/does/not/exist.bin
 ## 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
+; to_file = yes
 ; # Whether or not to log to stdout
 ; to_stdout = yes
 ; # Whether or not to log to syslog
@@ -25,13 +25,16 @@ url = https://example.com/does/not/exist.bin
 ; to_syslog = no
 
 ; # 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
\ No newline at end of file
+; to_syslog_format = ${format}
\ No newline at end of file
diff --git a/docs/source/man_sbws.ini.rst b/docs/source/man_sbws.ini.rst
index 0ea98b5..4ec7efb 100644
--- a/docs/source/man_sbws.ini.rst
+++ b/docs/source/man_sbws.ini.rst
@@ -139,6 +139,8 @@ logging
     Whether or not to log to stdout. (Default: yes)
   to_syslog = {yes, no}
     Whether or not to log to syslog. (Default: no)
+    NOTE that when sbws is launched by systemd, stdout goes to journal and
+    syslog.
   to_file_max_bytes = INT
     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



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