diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-11-01 04:38:43 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-11-01 04:38:43 +0000 |
commit | 2645219b4c2140b434fc3710f108ab6993afbfed (patch) | |
tree | fe5344f3d5d0b328bd66a4e8f0624d922268e00c /src/or/main.c | |
parent | 401b5c26de8d83f6af105abe560a0adc63890873 (diff) | |
download | tor-2645219b4c2140b434fc3710f108ab6993afbfed.tar tor-2645219b4c2140b434fc3710f108ab6993afbfed.tar.gz |
r16322@catbus: nickm | 2007-11-01 00:26:15 -0400
Implement --quiet.
svn:r12306
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index 08b5e805e..ea09bf524 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1718,6 +1718,7 @@ handle_signals(int is_parent) tor_init(int argc, char *argv[]) { char buf[256]; + int i, quiet = 0; time_of_process_start = time(NULL); if (!connection_array) connection_array = smartlist_create(); @@ -1737,8 +1738,16 @@ tor_init(int argc, char *argv[]) addressmap_init(); /* Init the client dns cache. Do it always, since it's * cheap. */ - /* give it somewhere to log to initially */ - add_temp_log(); + /* We search for the "quiet" option first, since it decides whether we + * will log anything at all to the command line. */ + for (i=1;i<argc;++i) { + if (!strcmp(argv[i], "--quiet")) /*DOCDOC in mangpage.*/ + quiet = 1; + } + if (!quiet) { + /* give it somewhere to log to initially */ + add_temp_log(); + } 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(), |