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

[tor-commits] [torsocks/master] Add a -q/--quiet to torsocks



commit 0b199d9e173a7c88adbf804a484c8320a802d74e
Author: David Goulet <dgoulet@xxxxxxxxx>
Date:   Fri Feb 24 15:14:23 2017 -0500

    Add a -q/--quiet to torsocks
    
    This option disables all logging by setting TORSOCKS_LOG_LEVEL=1.
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
 doc/torsocks.1      | 3 +++
 src/bin/torsocks.in | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/doc/torsocks.1 b/doc/torsocks.1
index e4ac628..4a691e1 100644
--- a/doc/torsocks.1
+++ b/doc/torsocks.1
@@ -61,6 +61,9 @@ and Password MUST NOT be set.
 .BR "\-d, \-\-debug"
 Activate the debug mode. Output will be written on stderr.
 .TP
+.BR "\-q, \-\-quiet"
+Suppress every log messages (even errors).
+.TP
 .BR "on | off"
 This option adds or removes \fBtorsocks(8)\fP from the LD_PRELOAD environment
 variable for the current shell. If you want to use this option, you HAVE to
diff --git a/src/bin/torsocks.in b/src/bin/torsocks.in
index 15ffbfc..fe8b67a 100644
--- a/src/bin/torsocks.in
+++ b/src/bin/torsocks.in
@@ -294,6 +294,10 @@ do
 			# Set full DEBUG with 5 being the highest possible level.
 			export TORSOCKS_LOG_LEVEL=5
 			;;
+		-q|--quiet)
+			# Silence logging.
+			export TORSOCKS_LOG_LEVEL=1
+			;;
 		--shell)
 			tor_shell
 			break

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