提交 f175c711 authored 作者: Nathan Neulinger's avatar Nathan Neulinger

FS-6805 add support for logging full timestamps with dialplan, defaults to old…

FS-6805 add support for logging full timestamps with dialplan, defaults to old behavior unless requested
上级 c79360c5
......@@ -18,6 +18,8 @@
<settings>
<!--Colorize the Console -->
<param name="colorize-console" value="true"/>
<!--Include full timestamps in dialplan logs -->
<param name="dialplan-timestamps" value="false"/>
<!--Most channels to allow at once -->
<param name="max-sessions" value="1000"/>
<!--Most channels to create per second -->
......
......@@ -18,6 +18,8 @@
<settings>
<!--Colorize the Console -->
<param name="colorize-console" value="true"/>
<!--Include full timestamps in dialplan logs -->
<param name="dialplan-timestamps" value="false"/>
<!--Most channels to allow at once -->
<param name="max-sessions" value="1000"/>
<!--Most channels to create per second -->
......
......@@ -24,6 +24,9 @@
<!-- Colorize the Console -->
<param name="colorize-console" value="true"/>
<!--Include full timestamps in dialplan logs -->
<param name="dialplan-timestamps" value="false"/>
<!-- Run the timer at 20ms by default and drop down as needed unless you set 1m-timer=true which was previous default -->
<!-- <param name="1ms-timer" value="true"/> -->
......
......@@ -18,6 +18,8 @@
<settings>
<!--Colorize the Console -->
<param name="colorize-console" value="true"/>
<!--Include full timestamps in dialplan logs -->
<param name="dialplan-timestamps" value="false"/>
<!--Most channels to allow at once -->
<param name="max-sessions" value="1000"/>
<!--Most channels to create per second -->
......
......@@ -24,6 +24,9 @@
<!-- Colorize the Console -->
<param name="colorize-console" value="true"/>
<!--Include full timestamps in dialplan logs -->
<param name="dialplan-timestamps" value="false"/>
<!-- Run the timer at 20ms by default and drop down as needed unless you set 1m-timer=true which was previous default -->
<!-- <param name="1ms-timer" value="true"/> -->
......
......@@ -361,7 +361,8 @@ typedef enum {
SCF_CORE_NON_SQLITE_DB_REQ = (1 << 20),
SCF_DEBUG_SQL = (1 << 21),
SCF_API_EXPANSION = (1 << 22),
SCF_SESSION_THREAD_POOL = (1 << 23)
SCF_SESSION_THREAD_POOL = (1 << 23),
SCF_DIALPLAN_TIMESTAMPS = (1 << 24)
} switch_core_flag_enum_t;
typedef uint32_t switch_core_flag_t;
......
......@@ -1980,6 +1980,12 @@ static void switch_load_core_config(const char *file)
runtime.core_db_inner_pre_trans_execute = switch_core_strdup(runtime.memory_pool, val);
} else if (!strcasecmp(var, "core-db-inner-post-trans-execute") && !zstr(val)) {
runtime.core_db_inner_post_trans_execute = switch_core_strdup(runtime.memory_pool, val);
} else if (!strcasecmp(var, "dialplan-timestamps")) {
if (switch_true(val)) {
switch_set_flag((&runtime), SCF_DIALPLAN_TIMESTAMPS);
} else {
switch_clear_flag((&runtime), SCF_DIALPLAN_TIMESTAMPS);
}
} else if (!strcasecmp(var, "mailer-app") && !zstr(val)) {
runtime.mailer_app = switch_core_strdup(runtime.memory_pool, val);
} else if (!strcasecmp(var, "mailer-app-args") && val) {
......
......@@ -2811,8 +2811,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG, "EXECUTE %s %s(%s)\n",
if ( switch_core_test_flag(SCF_DIALPLAN_TIMESTAMPS) ) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "EXECUTE %s %s(%s)\n",
switch_channel_get_name(session->channel), app, switch_str_nil(expanded));
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG, "EXECUTE %s %s(%s)\n",
switch_channel_get_name(session->channel), app, switch_str_nil(expanded));
}
if ((var = switch_channel_get_variable(session->channel, "verbose_presence")) && switch_true(var)) {
char *myarg = NULL;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论