diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-03-08 09:31:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-08 09:31:38 +0100 |
commit | a16022660c3094247871ce7b1fb2eaaa7a377dd5 (patch) | |
tree | 60d4511e3a27150441aaeb0afcf1f622e60d93dd /daemon | |
parent | f6e739cc07455d6a8b10b679b10806d97cca9229 (diff) |
Wait for logs to be opened before calling anonymous statistics (#5573)
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/daemon/main.c b/daemon/main.c index 5353d11072..e875fa938c 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -960,9 +960,6 @@ int main(int argc, char **argv) { get_netdata_configured_variables(); set_global_environment(); - netdata_anonymous_statistics_enabled=-1; - send_statistics("START","-", "-"); - // work while we are cd into config_dir // to allow the plugins refer to their config // files using relative filenames @@ -995,11 +992,9 @@ int main(int argc, char **argv) { // -------------------------------------------------------------------- // get log filenames and settings - log_init(); error_log_limit_unlimited(); - // -------------------------------------------------------------------- // setup process signals @@ -1040,6 +1035,7 @@ int main(int argc, char **argv) { user = config_get(CONFIG_SECTION_GLOBAL, "run as user", (passwd && passwd->pw_name)?passwd->pw_name:""); } + // -------------------------------------------------------------------- // create the listening sockets @@ -1052,6 +1048,8 @@ int main(int argc, char **argv) { // initialize the log files open_all_log_files(); + netdata_anonymous_statistics_enabled=-1; + send_statistics("START","-", "-"); #ifdef NETDATA_INTERNAL_CHECKS if(debug_flags != 0) { |