mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-26 13:14:14 +00:00
Set log levels on many existing log messages. A huge thanks to James Martelletti for going through all the log calls to do this.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1173 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
fd7bf0eaaa
commit
026e8d39ca
34 files changed
+387
-387
No files matched your search
@@ -52,11 +52,11 @@ static switch_caller_extension *demo_dialplan_hunt(switch_core_session *session)
|
||||
caller_profile = switch_channel_get_caller_profile(channel);
|
||||
//switch_channel_set_variable(channel, "pleasework", "yay");
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
|
||||
caller_profile->destination_number);
|
||||
|
||||
if (!switch_config_open_file(&cfg, cf)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
|
||||
switch_channel_hangup(channel);
|
||||
return NULL;
|
||||
}
|
||||
@@ -73,14 +73,14 @@ static switch_caller_extension *demo_dialplan_hunt(switch_core_session *session)
|
||||
*data = '\0';
|
||||
data++;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "invalid extension on line %d\n", cfg.lineno);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "invalid extension on line %d\n", cfg.lineno);
|
||||
continue;
|
||||
}
|
||||
if (!extension) {
|
||||
if ((extension =
|
||||
switch_caller_extension_new(session, caller_profile->destination_number,
|
||||
caller_profile->destination_number)) == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "memory error!\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ static void load_config(void)
|
||||
char *var, *val;
|
||||
|
||||
if (!switch_config_open_file(&cfg, cf)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ static switch_caller_extension *directory_dialplan_hunt(switch_core_session *ses
|
||||
|
||||
caller_profile = switch_channel_get_caller_profile(channel);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name,
|
||||
caller_profile->destination_number);
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ static switch_caller_extension *directory_dialplan_hunt(switch_core_session *ses
|
||||
globals.dn,
|
||||
globals.pass,
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't connect\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't connect\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ static switch_caller_extension *directory_dialplan_hunt(switch_core_session *ses
|
||||
if (!extension) {
|
||||
if ((extension = switch_caller_extension_new(session, caller_profile->destination_number,
|
||||
caller_profile->destination_number)) == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "memory error!\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,11 +61,11 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
|
||||
channel = switch_core_session_get_channel(session);
|
||||
caller_profile = switch_channel_get_caller_profile(channel);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Processing %s->%s!\n", caller_profile->caller_id_name,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Processing %s->%s!\n", caller_profile->caller_id_name,
|
||||
caller_profile->destination_number);
|
||||
|
||||
if (!switch_config_open_file(&cfg, cf)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "open of %s failed\n", cf);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
|
||||
switch_channel_hangup(channel);
|
||||
return NULL;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
|
||||
&erroffset, /* for error offset */
|
||||
NULL); /* use default character tables */
|
||||
if (error) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "COMPILE ERROR: %d [%s]\n", erroffset, error);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "COMPILE ERROR: %d [%s]\n", erroffset, error);
|
||||
cleanre();
|
||||
switch_channel_hangup(channel);
|
||||
return NULL;
|
||||
@@ -116,7 +116,7 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
|
||||
sizeof(ovector) / sizeof(ovector[0])); /* number of elements (NOT size in bytes) */
|
||||
} else if (match_count > 0 && !strcasecmp(var, "match")) {
|
||||
if (!re) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ERROR: match without regex in %s line %d\n", cfg.path,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: match without regex in %s line %d\n", cfg.path,
|
||||
cfg.lineno);
|
||||
continue;
|
||||
} else {
|
||||
@@ -164,7 +164,7 @@ static switch_caller_extension *dialplan_hunt(switch_core_session *session)
|
||||
if (!extension) {
|
||||
if ((extension =
|
||||
switch_caller_extension_new(session, exten_name, caller_profile->destination_number)) == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "memory error!\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user