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:
Michael Jerris
2006-04-16 06:05:53 +00:00
parent fd7bf0eaaa
commit 026e8d39ca
34 changed files with 387 additions and 387 deletions

View File

@@ -108,7 +108,7 @@ static switch_status ice_out(switch_rtp *rtp_session)
elapsed = (unsigned int)((switch_time_now() - rtp_session->last_stun) / 1000);
if (elapsed > 10000) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No stun for a long time (PUNT!)\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No stun for a long time (PUNT!)\n");
return SWITCH_STATUS_FALSE;
}
}
@@ -295,7 +295,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
/* check that hex string is the right length */
if (len < MASTER_KEY_LEN*2) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"error: too few digits in key/salt "
"(should be %d hexadecimal digits, found %d)\n",
MASTER_KEY_LEN*2, len);
@@ -303,7 +303,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
return SWITCH_STATUS_FALSE;
}
if (strlen(crypto_key) > MASTER_KEY_LEN*2) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"error: too many digits in key/salt "
"(should be %d hexadecimal digits, found %u)\n",
MASTER_KEY_LEN*2, (unsigned)strlen(crypto_key));
@@ -313,7 +313,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "set master key/salt to %s/", octet_string_hex_string(key, 16));
//switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, "%s\n", octet_string_hex_string(key+16, 14));
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activating Secure RTP!\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Activating Secure RTP!\n");
}
rtp_session->send_msg.header.ssrc = htonl(ssrc);
@@ -346,12 +346,12 @@ SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp **new_rtp_session,
err_status_t stat;
if ((stat = srtp_create(&rtp_session->recv_ctx, &policy))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error allocating srtp [%d]\n", stat);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error allocating srtp [%d]\n", stat);
*err = "Crypt Error";
return SWITCH_STATUS_FALSE;
}
if ((stat = srtp_create(&rtp_session->send_ctx, &policy))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error allocating srtp [%d]\n", stat);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error allocating srtp [%d]\n", stat);
*err = "Crypt Error";
return SWITCH_STATUS_FALSE;
}
@@ -485,7 +485,7 @@ static int rtp_common_read(switch_rtp *rtp_session, void *data, int *payload_typ
stat = srtp_unprotect(rtp_session->recv_ctx, &rtp_session->recv_msg.header, &sbytes);
if (stat) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"error: srtp unprotection failed with code %d%s\n", stat,
stat == err_status_replay_fail ? " (replay check failed)" :
stat == err_status_auth_fail ? " (auth check failed)" : "");
@@ -580,7 +580,7 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale
if (rtp_session->packet_size > datalen && (payload == rtp_session->payload)) {
if (!rtp_session->packet_buffer) {
if (switch_buffer_create(rtp_session->pool, &rtp_session->packet_buffer, rtp_session->packet_size * 2) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Buffer memory error\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Buffer memory error\n");
return -1;
}
}
@@ -602,7 +602,7 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale
stat = srtp_protect(rtp_session->send_ctx, &rtp_session->send_msg.header, &sbytes);
if (stat) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "error: srtp unprotection failed with code %d\n", stat);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "error: srtp unprotection failed with code %d\n", stat);
}
bytes = sbytes;