diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-02 23:36:58 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-02 23:36:58 +0000 |
commit | bd6b3072f902d11f969914c997533c7584f263d5 (patch) | |
tree | 9ad59d500fbcaf50711cca75e37ee62fe1914dbd /src/tools | |
parent | 6221bdd294c58399e12d13983cca0f0285033092 (diff) | |
download | tor-bd6b3072f902d11f969914c997533c7584f263d5.tar.gz tor-bd6b3072f902d11f969914c997533c7584f263d5.zip |
Change logging code to use fds instead of stdio. Fixes bug 861, and probably makes logging slightly faster. Not a backport candidate: bug 861 is too obscure and harmless.
svn:r17456
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/tor-gencert.c | 2 | ||||
-rw-r--r-- | src/tools/tor-resolve.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index b196a8c368..58ba7034ca 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -195,7 +195,7 @@ parse_commandline(int argc, char **argv) set_log_severity_config(LOG_DEBUG, LOG_ERR, &s); else set_log_severity_config(LOG_WARN, LOG_ERR, &s); - add_stream_log(&s, "<stderr>", stderr); + add_stream_log(&s, "<stderr>", fileno(stderr)); if (!identity_key_file) { identity_key_file = tor_strdup("./authority_identity_key"); diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index 90f736df35..50ab28e1cd 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -367,7 +367,7 @@ main(int argc, char **argv) set_log_severity_config(LOG_DEBUG, LOG_ERR, s); else set_log_severity_config(LOG_WARN, LOG_ERR, s); - add_stream_log(s, "<stderr>", stderr); + add_stream_log(s, "<stderr>", fileno(stderr)); if (n_args == 1) { log_debug(LD_CONFIG, "defaulting to localhost"); |