diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-10-22 10:14:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-10-22 10:14:03 -0400 |
commit | 8e4daa7bb0941037b6b5585059e5570267ee6eb9 (patch) | |
tree | 6e25f987b8db6c6f5e43aef8251e49adb34ae7b7 /src/or | |
parent | 71613993e0f9c015d33f1405187a5c5828987ea2 (diff) | |
parent | 93dfb1203715bd275d0eed6c8cccf6b6db76fd95 (diff) | |
download | tor-8e4daa7bb0941037b6b5585059e5570267ee6eb9.tar.gz tor-8e4daa7bb0941037b6b5585059e5570267ee6eb9.zip |
Merge remote-tracking branch 'public/ticket6938'
Conflicts:
src/tools/tor-resolve.c
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 6 | ||||
-rw-r--r-- | src/or/main.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index 5555a2eb3b..2318e63b8e 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1001,7 +1001,7 @@ options_act_reversible(const or_options_t *old_options, char **msg) int running_tor = options->command == CMD_RUN_TOR; int set_conn_limit = 0; int r = -1; - int logs_marked = 0; + int logs_marked = 0, logs_initialized = 0; int old_min_log_level = get_min_log_level(); /* Daemonize _first_, since we only want to open most of this stuff in @@ -1131,6 +1131,7 @@ options_act_reversible(const or_options_t *old_options, char **msg) *msg = tor_strdup("Failed to init Log options. See logs for details."); goto rollback; } + logs_initialized = 1; commit: r = 0; @@ -1143,6 +1144,9 @@ options_act_reversible(const or_options_t *old_options, char **msg) tor_free(severity); tor_log_update_sigsafe_err_fds(); } + if (logs_initialized) { + flush_log_messages_from_startup(); + } { const char *badness = NULL; diff --git a/src/or/main.c b/src/or/main.c index 61efc1f6f2..1d26223eb6 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2955,7 +2955,7 @@ tor_main(int argc, char *argv[]) update_approx_time(time(NULL)); tor_threads_init(); - init_logging(); + init_logging(0); #ifdef USE_DMALLOC { /* Instruct OpenSSL to use our internal wrappers for malloc, |