Skip to content

Commit

Permalink
Wait for logs to be opened before calling anonymous statistics (#5573)
Browse files Browse the repository at this point in the history
  • Loading branch information
cakrit committed Mar 8, 2019
1 parent f6e739c commit a160226
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions daemon/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -995,11 +992,9 @@ int main(int argc, char **argv) {

// --------------------------------------------------------------------
// get log filenames and settings

log_init();
error_log_limit_unlimited();


// --------------------------------------------------------------------
// setup process signals

Expand Down Expand Up @@ -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

Expand All @@ -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) {
Expand Down

0 comments on commit a160226

Please sign in to comment.