individual queue, the PAUSEALL/UNPAUSEALL event will only be logged if at
least one member of any queue exists for that interface.
+ * Added the 'queue_log_realtime_use_gmt' option to have timestamps in GMT
+ for realtime queue log entries.
+
Queue
-------------------
* Add queue available hint. exten => 8501,hint,Queue:markq_avail
; (defaults to queue_log)
;queue_log_name = queue_log
;
+; When using realtime for the queue log, use GMT for the timestamp
+; instead of localtime. The default of this option is 'no'.
+;queue_log_realtime_use_gmt = yes
+;
; Log rotation strategy:
; none: Do not perform any logrotation at all. You should make
; very sure to set up some external logrotate mechanism
unsigned int queue_log:1;
unsigned int queue_log_to_file:1;
unsigned int queue_adaptive_realtime:1;
+ unsigned int queue_log_realtime_use_gmt:1;
} logfiles = { 1 };
static char hostname[MAXHOSTNAMELEN];
if ((s = ast_variable_retrieve(cfg, "general", "queue_log_name"))) {
ast_copy_string(queue_log_name, s, sizeof(queue_log_name));
}
+ if ((s = ast_variable_retrieve(cfg, "general", "queue_log_realtime_use_gmt"))) {
+ logfiles.queue_log_realtime_use_gmt = ast_true(s);
+ }
if ((s = ast_variable_retrieve(cfg, "general", "exec_after_rotate"))) {
ast_copy_string(exec_after_rotate, s, sizeof(exec_after_rotate));
}
if (ast_check_realtime("queue_log")) {
tv = ast_tvnow();
- ast_localtime(&tv, &tm, NULL);
+ ast_localtime(&tv, &tm, logfiles.queue_log_realtime_use_gmt ? "GMT" : NULL);
ast_strftime(time_str, sizeof(time_str), "%F %T.%6q", &tm);
va_start(ap, fmt);
vsnprintf(qlog_msg, sizeof(qlog_msg), fmt, ap);