]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Log channel UUID by default
authorTravis Cross <tc@traviscross.com>
Wed, 22 Jan 2014 21:01:13 +0000 (21:01 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 2 Mar 2014 10:29:29 +0000 (10:29 +0000)
We want people to have this on so that when we're looking at reported
log files we can tell what is going on.

conf/vanilla/autoload_configs/logfile.conf.xml
conf/vanilla/autoload_configs/syslog.conf.xml
src/mod/loggers/mod_logfile/conf/autoload_configs/logfile.conf.xml
src/mod/loggers/mod_logfile/mod_logfile.c
src/mod/loggers/mod_syslog/conf/autoload_configs/syslog.conf.xml
src/mod/loggers/mod_syslog/mod_syslog.c

index 65bea552bd51d6796a27c525ad6c4ad8b371014f..546db4abafa359f006c30fad9fb447a36fad16f0 100644 (file)
@@ -13,8 +13,8 @@
                <!-- Maximum number of log files to keep before wrapping -->
                <!-- If this parameter is enabled, the log filenames will not include a date stamp -->
                <!-- <param name="maximum-rotate" value="32"/> -->
-               <!-- Uncomment to prefix all log lines by the session's uuid  -->
-               <!-- <param name="uuid" value="true" /> -->
+        <!-- Prefix all log lines by the session's uuid  -->
+        <param name="uuid" value="true" />
       </settings>
       <mappings>
        <!-- 
index 636a12c8c1c8ce1d6db3cd3eb5bdd093f4c0076b..7a06e8f3b0b4ee645f1e6b873b0862b147a4d029 100644 (file)
@@ -12,7 +12,7 @@
     <param name="facility" value="user"/>
     <param name="ident" value="freeswitch"/>
     <param name="loglevel" value="warning"/>
-       <!-- Uncomment the following line to log uuids in syslogs (when applicable) -->
-    <!-- <param name="uuid" value="true"/> -->
+    <!-- log uuids in syslogs -->
+    <param name="uuid" value="true"/>
   </settings>
 </configuration>
index 65bea552bd51d6796a27c525ad6c4ad8b371014f..546db4abafa359f006c30fad9fb447a36fad16f0 100644 (file)
@@ -13,8 +13,8 @@
                <!-- Maximum number of log files to keep before wrapping -->
                <!-- If this parameter is enabled, the log filenames will not include a date stamp -->
                <!-- <param name="maximum-rotate" value="32"/> -->
-               <!-- Uncomment to prefix all log lines by the session's uuid  -->
-               <!-- <param name="uuid" value="true" /> -->
+        <!-- Prefix all log lines by the session's uuid  -->
+        <param name="uuid" value="true" />
       </settings>
       <mappings>
        <!-- 
index 1ed171c78364e10ccdd61b85f5f060dd52c648c8..ab85dc5f16db2b8666dd690a4ceedc286cd5db67 100644 (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->suffix = 1;
+       new_profile->log_uuid = SWITCH_TRUE;
 
        if ((settings = switch_xml_child(xml, "settings"))) {
                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) {
                                        new_profile->max_rot = MAX_ROT;
                                }
-                       } else if (!strcmp(var, "uuid") && switch_true(val)) {
-                               new_profile->log_uuid = SWITCH_TRUE;
+                       } else if (!strcmp(var, "uuid")) {
+                               new_profile->log_uuid = switch_true(val);
                        }
                }
        }
index 636a12c8c1c8ce1d6db3cd3eb5bdd093f4c0076b..7a06e8f3b0b4ee645f1e6b873b0862b147a4d029 100644 (file)
@@ -12,7 +12,7 @@
     <param name="facility" value="user"/>
     <param name="ident" value="freeswitch"/>
     <param name="loglevel" value="warning"/>
-       <!-- Uncomment the following line to log uuids in syslogs (when applicable) -->
-    <!-- <param name="uuid" value="true"/> -->
+    <!-- log uuids in syslogs -->
+    <param name="uuid" value="true"/>
   </settings>
 </configuration>
index 045b9831abf885c26b5375946bcd3d215768fe8c..d0fe2dea1d16ef0bba3ed05f6132b23306c4cb1d 100644 (file)
@@ -181,6 +181,7 @@ static switch_status_t load_config(void)
 
        /* default facility */
        globals.facility = DEFAULT_FACILITY;
+       globals.log_uuid = SWITCH_TRUE;
 
        if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);