@cryptotaxi247 / netdata-1 / commits / a16022660

Wait for logs to be opened before calling anonymous statistics (#5573)

Chris Akritidis committed Mar 8, 2019 at 09:31 UTC a16022660c3094247871ce7b1fb2eaaa7a377dd5
1 file changed +3 -5
daemon/main.c
+3 -5
@@ -960,9 +960,6 @@ int main(int argc, char **argv) {
960 get_netdata_configured_variables();
961 set_global_environment();
962
963 - netdata_anonymous_statistics_enabled=-1;
964 - send_statistics("START","-", "-");
965 -
963 // work while we are cd into config_dir
964 // to allow the plugins refer to their config
965 // files using relative filenames
@@ -995,11 +992,9 @@ int main(int argc, char **argv) {
992
993 // --------------------------------------------------------------------
994 // get log filenames and settings
998 -
995 log_init();
996 error_log_limit_unlimited();
997
1002 -
998 // --------------------------------------------------------------------
999 // setup process signals
1000
@@ -1040,6 +1035,7 @@ int main(int argc, char **argv) {
1035 user = config_get(CONFIG_SECTION_GLOBAL, "run as user", (passwd && passwd->pw_name)?passwd->pw_name:"");
1036 }
1037
1038 +
1039 // --------------------------------------------------------------------
1040 // create the listening sockets
1041
@@ -1052,6 +1048,8 @@ int main(int argc, char **argv) {
1048
1049 // initialize the log files
1050 open_all_log_files();
1051 + netdata_anonymous_statistics_enabled=-1;
1052 + send_statistics("START","-", "-");
1053
1054 #ifdef NETDATA_INTERNAL_CHECKS
1055 if(debug_flags != 0) {