mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-02 01:25:11 +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
@@ -491,7 +491,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
|
||||
switch_core_session_set_private(*new_session, tech_pvt);
|
||||
tech_pvt->session = *new_session;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
|
||||
switch_core_session_destroy(new_session);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
@@ -507,7 +507,7 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
|
||||
switch_channel_set_caller_profile(channel, caller_profile);
|
||||
tech_pvt->caller_profile = caller_profile;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
|
||||
switch_core_session_destroy(new_session);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
@@ -527,7 +527,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
|
||||
{
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
|
||||
dump_info();
|
||||
|
||||
if (switch_event_reserve_subclass(MY_EVENT_RINGING) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Couldn't register subclass!");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ static switch_status load_config(void)
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
|
||||
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 SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
@@ -632,7 +632,7 @@ static int get_dev_by_name(char *name, int in)
|
||||
numDevices = Pa_CountDevices();
|
||||
|
||||
if (numDevices < 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
|
||||
return -2;
|
||||
}
|
||||
|
||||
@@ -658,55 +658,55 @@ static int dump_info(void)
|
||||
PaError err;
|
||||
numDevices = Pa_CountDevices();
|
||||
if (numDevices < 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
|
||||
err = numDevices;
|
||||
goto error;
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Number of devices = %d\n", numDevices);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Number of devices = %d\n", numDevices);
|
||||
for (i = 0; i < numDevices; i++) {
|
||||
pdi = Pa_GetDeviceInfo(i);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "---------------------------------------------- #%d", i);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "---------------------------------------------- #%d", i);
|
||||
if (i == Pa_GetDefaultInputDeviceID())
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, " DefaultInput");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, " DefaultInput");
|
||||
if (i == Pa_GetDefaultOutputDeviceID())
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, " DefaultOutput");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "\nName = %s\n", pdi->name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Max Inputs = %d", pdi->maxInputChannels);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, ", Max Outputs = %d\n", pdi->maxOutputChannels);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, " DefaultOutput");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "\nName = %s\n", pdi->name);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Max Inputs = %d", pdi->maxInputChannels);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, ", Max Outputs = %d\n", pdi->maxOutputChannels);
|
||||
if (pdi->numSampleRates == -1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Sample Rate Range = %f to %f\n", pdi->sampleRates[0],
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Sample Rate Range = %f to %f\n", pdi->sampleRates[0],
|
||||
pdi->sampleRates[1]);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Sample Rates =");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Sample Rates =");
|
||||
for (j = 0; j < pdi->numSampleRates; j++) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, " %8.2f,", pdi->sampleRates[j]);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, " %8.2f,", pdi->sampleRates[j]);
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "\n");
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Native Sample Formats = ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "Native Sample Formats = ");
|
||||
if (pdi->nativeSampleFormats & paInt8)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt8, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt8, ");
|
||||
if (pdi->nativeSampleFormats & paUInt8)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paUInt8, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paUInt8, ");
|
||||
if (pdi->nativeSampleFormats & paInt16)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt16, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt16, ");
|
||||
if (pdi->nativeSampleFormats & paInt32)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt32, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt32, ");
|
||||
if (pdi->nativeSampleFormats & paFloat32)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paFloat32, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paFloat32, ");
|
||||
if (pdi->nativeSampleFormats & paInt24)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paInt24, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paInt24, ");
|
||||
if (pdi->nativeSampleFormats & paPackedInt24)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "paPackedInt24, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "paPackedInt24, ");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "\n");
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "----------------------------------------------\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "----------------------------------------------\n");
|
||||
return 0;
|
||||
error:
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "An error occured while using the portaudio stream\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Error number: %d\n", err);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "Error message: %s\n", Pa_GetErrorText(err));
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "An error occured while using the portaudio stream\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error number: %d\n", err);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Error message: %s\n", Pa_GetErrorText(err));
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -726,7 +726,7 @@ static switch_status engage_device(struct private_object *tech_pvt)
|
||||
1,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
||||
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
if (switch_core_codec_init(&tech_pvt->write_codec,
|
||||
@@ -736,12 +736,12 @@ static switch_status engage_device(struct private_object *tech_pvt)
|
||||
1,
|
||||
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
||||
NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't load codec?\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
|
||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Loaded codec L16 %dhz %dms on %s\n", sample_rate, codec_ms,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Loaded codec L16 %dhz %dms on %s\n", sample_rate, codec_ms,
|
||||
switch_channel_get_name(channel));
|
||||
tech_pvt->read_frame.rate = sample_rate;
|
||||
tech_pvt->read_frame.codec = &tech_pvt->read_codec;
|
||||
@@ -758,12 +758,12 @@ static switch_status engage_device(struct private_object *tech_pvt)
|
||||
if ((tech_pvt->err =
|
||||
OpenAudioStream(&tech_pvt->audio_out, sample_rate, SAMPLE_TYPE, PABLIO_WRITE | PABLIO_MONO, -1,
|
||||
tech_pvt->outdev)) != paNoError) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open audio out [%d]!\n", tech_pvt->outdev);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open audio out [%d]!\n", tech_pvt->outdev);
|
||||
CloseAudioStream(tech_pvt->audio_in);
|
||||
tech_pvt->audio_in = NULL;
|
||||
}
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Can't open audio in [%d]!\n", tech_pvt->indev);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open audio in [%d]!\n", tech_pvt->indev);
|
||||
}
|
||||
switch_mutex_unlock(globals.device_lock);
|
||||
|
||||
@@ -803,7 +803,7 @@ static switch_status place_call(char *dest, char *out, size_t outlen)
|
||||
switch_core_session_set_private(session, tech_pvt);
|
||||
tech_pvt->session = session;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hey where is my memory pool?\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
|
||||
switch_core_session_destroy(&session);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user