Przeglądaj źródła

Add log for prometheus collector start

Mészáros Mihály 5 lat temu
rodzic
commit
87d85f06bd
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      src/apps/relay/mainrelay.c

+ 6 - 1
src/apps/relay/mainrelay.c

@@ -2485,7 +2485,12 @@ int main(int argc, char **argv)
 
 	drop_privileges();
 #if !defined(TURN_NO_PROMETHEUS)
-	start_prometheus_server();
+	if (start_prometheus_server()){
+	  TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR, "\nCould not start Prometheus collector!\n");
+	}
+	else {
+	  TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "\nPrometheus collector started sucessfully.\n");
+	}
 #endif