提交 c31aa5d3 authored 作者: Travis Cross's avatar Travis Cross

Log channel UUID by default

We want people to have this on so that when we're looking at reported
log files we can tell what is going on.
上级 e51cca59
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<!-- Maximum number of log files to keep before wrapping --> <!-- Maximum number of log files to keep before wrapping -->
<!-- If this parameter is enabled, the log filenames will not include a date stamp --> <!-- If this parameter is enabled, the log filenames will not include a date stamp -->
<!-- <param name="maximum-rotate" value="32"/> --> <!-- <param name="maximum-rotate" value="32"/> -->
<!-- Uncomment to prefix all log lines by the session's uuid --> <!-- Prefix all log lines by the session's uuid -->
<!-- <param name="uuid" value="true" /> --> <param name="uuid" value="true" />
</settings> </settings>
<mappings> <mappings>
<!-- <!--
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<param name="facility" value="user"/> <param name="facility" value="user"/>
<param name="ident" value="freeswitch"/> <param name="ident" value="freeswitch"/>
<param name="loglevel" value="warning"/> <param name="loglevel" value="warning"/>
<!-- Uncomment the following line to log uuids in syslogs (when applicable) --> <!-- log uuids in syslogs -->
<!-- <param name="uuid" value="true"/> --> <param name="uuid" value="true"/>
</settings> </settings>
</configuration> </configuration>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<!-- Maximum number of log files to keep before wrapping --> <!-- Maximum number of log files to keep before wrapping -->
<!-- If this parameter is enabled, the log filenames will not include a date stamp --> <!-- If this parameter is enabled, the log filenames will not include a date stamp -->
<!-- <param name="maximum-rotate" value="32"/> --> <!-- <param name="maximum-rotate" value="32"/> -->
<!-- Uncomment to prefix all log lines by the session's uuid --> <!-- Prefix all log lines by the session's uuid -->
<!-- <param name="uuid" value="true" /> --> <param name="uuid" value="true" />
</settings> </settings>
<mappings> <mappings>
<!-- <!--
......
...@@ -325,6 +325,7 @@ static switch_status_t load_profile(switch_xml_t xml) ...@@ -325,6 +325,7 @@ static switch_status_t load_profile(switch_xml_t xml)
new_profile->name = switch_core_strdup(module_pool, switch_str_nil(name)); new_profile->name = switch_core_strdup(module_pool, switch_str_nil(name));
new_profile->suffix = 1; new_profile->suffix = 1;
new_profile->log_uuid = SWITCH_TRUE;
if ((settings = switch_xml_child(xml, "settings"))) { if ((settings = switch_xml_child(xml, "settings"))) {
for (param = switch_xml_child(settings, "param"); param; param = param->next) { for (param = switch_xml_child(settings, "param"); param; param = param->next) {
...@@ -339,8 +340,8 @@ static switch_status_t load_profile(switch_xml_t xml) ...@@ -339,8 +340,8 @@ static switch_status_t load_profile(switch_xml_t xml)
if (new_profile->max_rot == 0) { if (new_profile->max_rot == 0) {
new_profile->max_rot = MAX_ROT; new_profile->max_rot = MAX_ROT;
} }
} else if (!strcmp(var, "uuid") && switch_true(val)) { } else if (!strcmp(var, "uuid")) {
new_profile->log_uuid = SWITCH_TRUE; new_profile->log_uuid = switch_true(val);
} }
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<param name="facility" value="user"/> <param name="facility" value="user"/>
<param name="ident" value="freeswitch"/> <param name="ident" value="freeswitch"/>
<param name="loglevel" value="warning"/> <param name="loglevel" value="warning"/>
<!-- Uncomment the following line to log uuids in syslogs (when applicable) --> <!-- log uuids in syslogs -->
<!-- <param name="uuid" value="true"/> --> <param name="uuid" value="true"/>
</settings> </settings>
</configuration> </configuration>
...@@ -181,6 +181,7 @@ static switch_status_t load_config(void) ...@@ -181,6 +181,7 @@ static switch_status_t load_config(void)
/* default facility */ /* default facility */
globals.facility = DEFAULT_FACILITY; globals.facility = DEFAULT_FACILITY;
globals.log_uuid = SWITCH_TRUE;
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) { if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论