Skip to content

Commit a160226

Browse files
authored
Wait for logs to be opened before calling anonymous statistics (netdata#5573)
1 parent f6e739c commit a160226

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

daemon/main.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -960,9 +960,6 @@ int main(int argc, char **argv) {
960960
get_netdata_configured_variables();
961961
set_global_environment();
962962

963-
netdata_anonymous_statistics_enabled=-1;
964-
send_statistics("START","-", "-");
965-
966963
// work while we are cd into config_dir
967964
// to allow the plugins refer to their config
968965
// files using relative filenames
@@ -995,11 +992,9 @@ int main(int argc, char **argv) {
995992

996993
// --------------------------------------------------------------------
997994
// get log filenames and settings
998-
999995
log_init();
1000996
error_log_limit_unlimited();
1001997

1002-
1003998
// --------------------------------------------------------------------
1004999
// setup process signals
10051000

@@ -1040,6 +1035,7 @@ int main(int argc, char **argv) {
10401035
user = config_get(CONFIG_SECTION_GLOBAL, "run as user", (passwd && passwd->pw_name)?passwd->pw_name:"");
10411036
}
10421037

1038+
10431039
// --------------------------------------------------------------------
10441040
// create the listening sockets
10451041

@@ -1052,6 +1048,8 @@ int main(int argc, char **argv) {
10521048

10531049
// initialize the log files
10541050
open_all_log_files();
1051+
netdata_anonymous_statistics_enabled=-1;
1052+
send_statistics("START","-", "-");
10551053

10561054
#ifdef NETDATA_INTERNAL_CHECKS
10571055
if(debug_flags != 0) {

0 commit comments

Comments
 (0)