]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Improve name of new console log function
authorTravis Cross <tc@traviscross.com>
Wed, 16 Jul 2014 02:40:15 +0000 (02:40 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 16 Jul 2014 03:52:08 +0000 (03:52 +0000)
The new console log function here isn't any more of a channel log than
the old one.  The name was bad, and no one could have been using this
yet since we just ran reswig.  We'll take the same tack the kernel
developers do when replacing a function with an otherwise equivalent
one with a better API.

src/include/switch_cpp.h
src/switch_cpp.cpp

index 382c4b4fa17fb20fca11d79ef146291b2ff9adf9..13d41cb09613ce2aba0900c1e67a11d8e0e74dcc 100644 (file)
@@ -70,8 +70,8 @@ SWITCH_DECLARE(void) setGlobalVariable(char *var_name, char *var_val);
 SWITCH_DECLARE(char *) getGlobalVariable(char *var_name);
 
 SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg);
+SWITCH_DECLARE(void) consoleLog2(char *level_str, char *file, char *func, int line, char *msg);
 SWITCH_DECLARE(void) consoleCleanLog(char *msg);
-SWITCH_DECLARE(void) consoleChannelLog(char *level_str, char *file, char *func, int line, char *msg);
 SWITCH_DECLARE(bool) running(void);
 
 SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *body = NULL,
@@ -399,8 +399,8 @@ SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *bod
 /* ---- functions not bound to CoreSession instance ----- */
 
 SWITCH_DECLARE(void) console_log(char *level_str, char *msg);
+SWITCH_DECLARE(void) console_log2(char *level_str, char *file, char *func, int line, char *msg);
 SWITCH_DECLARE(void) console_clean_log(char *msg);
-SWITCH_DECLARE(void) console_channel_log(char *level_str, char *file, char *func, int line, char *msg);
 SWITCH_DECLARE(void) switch_msleep(unsigned ms);
 
 /** \brief bridge the audio of session_b into session_a
index e00f4d6280a8d6af7fb3ce9057494aa38e5e91ff..b1613f3a26375073cf929dd60b29b828d3c5e30b 100644 (file)
@@ -1287,14 +1287,14 @@ SWITCH_DECLARE(void) consoleLog(char *level_str, char *msg)
        return console_log(level_str, msg);
 }
 
-SWITCH_DECLARE(void) consoleCleanLog(char *msg)
+SWITCH_DECLARE(void) consoleLog2(char *level_str, char *file, char *func, int line, char *msg)
 {
-       return console_clean_log(msg);
+       return console_log2(level_str, file, func, line, msg);
 }
 
-SWITCH_DECLARE(void) consoleChannelLog(char *level_str, char *file, char *func, int line, char *msg)
+SWITCH_DECLARE(void) consoleCleanLog(char *msg)
 {
-    return console_channel_log(level_str, file, func, line, msg);
+       return console_clean_log(msg);
 }
 
 SWITCH_DECLARE(void) console_log(char *level_str, char *msg)
@@ -1309,12 +1309,7 @@ SWITCH_DECLARE(void) console_log(char *level_str, char *msg)
     switch_log_printf(SWITCH_CHANNEL_LOG, level, "%s", switch_str_nil(msg));
 }
 
-SWITCH_DECLARE(void) console_clean_log(char *msg)
-{
-    switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN,SWITCH_LOG_DEBUG, "%s", switch_str_nil(msg));
-}
-
-SWITCH_DECLARE(void) console_channel_log(char *level_str, char *file, char *func, int line, char *msg)
+SWITCH_DECLARE(void) console_log2(char *level_str, char *file, char *func, int line, char *msg)
 {
     switch_log_level_t level = SWITCH_LOG_DEBUG;
     if (level_str) {
@@ -1326,6 +1321,11 @@ SWITCH_DECLARE(void) console_channel_log(char *level_str, char *file, char *func
     switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, level, "%s", switch_str_nil(msg));
 }
 
+SWITCH_DECLARE(void) console_clean_log(char *msg)
+{
+    switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN,SWITCH_LOG_DEBUG, "%s", switch_str_nil(msg));
+}
+
 SWITCH_DECLARE(bool) email(char *to, char *from, char *headers, char *body, char *file, char *convert_cmd, char *convert_ext)
 {
     if (switch_simple_email(to, from, headers, body, file, convert_cmd, convert_ext) == SWITCH_TRUE) {