aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-08-04 14:23:51 -0400
committerNick Mathewson <nickm@torproject.org>2011-08-04 14:23:51 -0400
commite5e7b6d71835841f037841ea60cb4f39b554b892 (patch)
treeb1bb1388d948db1a35c78e205904d897c7e9e597 /src/or/main.c
parent6596aa022f03bad34a3ee9cbd627fefe55c01d54 (diff)
downloadtor-e5e7b6d71835841f037841ea60cb4f39b554b892.tar
tor-e5e7b6d71835841f037841ea60cb4f39b554b892.tar.gz
Make --quiet and --hush apply to default logs, not only initial logs
Fixes bug 3550; bugfix on 0.2.0.10-alpha (where --quiet was introduced).
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 54e6451e6..260de1677 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -154,6 +154,12 @@ int can_complete_circuit=0;
* they are obsolete? */
#define TLS_HANDSHAKE_TIMEOUT (60)
+/** Decides our behavior when no logs are configured/before any
+ * logs have been configured. For 0, we log notice to stdout as normal.
+ * For 1, we log warnings only. For 2, we log nothing.
+ */
+int quiet_level = 0;
+
/********* END VARIABLES ************/
/****************************************************************************
@@ -2148,6 +2154,7 @@ tor_init(int argc, char *argv[])
default:
add_temp_log(LOG_NOTICE);
}
+ quiet_level = quiet;
log(LOG_NOTICE, LD_GENERAL, "Tor v%s. This is experimental software. "
"Do not rely on it for strong anonymity. (Running on %s)",get_version(),