]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core] add idle cpu to log lines
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Dec 2019 20:10:50 +0000 (20:10 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:14 +0000 (22:00 +0300)
src/switch_log.c

index ad74862f6d33d93a57a6bbbdc965d98140ce673c..93fcc5ec37596fb7a32dcb9bce8d75da2546f13e 100644 (file)
@@ -559,8 +559,8 @@ SWITCH_DECLARE(void) switch_log_vprintf(switch_text_channel_t channel, const cha
                switch_time_exp_t tm;
 
                switch_time_exp_lt(&tm, now);
-               switch_snprintf(date, sizeof(date), "%0.4d-%0.2d-%0.2d %0.2d:%0.2d:%0.2d.%0.6d",
-                                               tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_usec);
+               switch_snprintf(date, sizeof(date), "%0.4d-%0.2d-%0.2d %0.2d:%0.2d:%0.2d.%0.6d %0.2f%%",
+                                               tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_usec, switch_core_idle_cpu());
 
                //switch_strftime_nocheck(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);