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.
This commit is contained in:
Travis Cross 2014-01-22 21:01:13 +00:00
parent c537fc6f61
commit 3a595f278a
6 changed files with 12 additions and 10 deletions

View File

@ -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>
<!-- <!--

View File

@ -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>

View File

@ -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>
<!-- <!--

View File

@ -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)
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);
} }
} }
} }

View File

@ -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>

View File

@ -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);