diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2015-02-06 21:17:48 +0100 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2015-02-06 21:34:21 +0100 |
commit | 6d8b614729bc8011d68a7234a81190ec11f6cd5f (patch) | |
tree | ff861a3db2052fbd76f2cde482e368a790f507af /src/common/log.c | |
parent | 16cf1679e78c690869be3d26448a965e8d1330b0 (diff) | |
download | tor-6d8b614729bc8011d68a7234a81190ec11f6cd5f.tar.gz tor-6d8b614729bc8011d68a7234a81190ec11f6cd5f.zip |
Avoid logging startup messages twice
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/log.c b/src/common/log.c index bbad7f1dac..e8cc30c312 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -1062,6 +1062,12 @@ flush_log_messages_from_startup(void) if (! logfile_wants_message(lf, msg->severity, msg->domain)) continue; + /* We configure a temporary startup log that goes to stdout, so we + * shouldn't replay to stdout/stderr*/ + if (lf->fd == STDOUT_FILENO || lf->fd == STDERR_FILENO) { + continue; + } + logfile_deliver(lf, msg->fullmsg, strlen(msg->fullmsg), msg->msg, msg->domain, msg->severity, &callbacks_deferred); } |