[Asterisk-code-review] general: Improve logging levels of some log messages. (asterisk[19])
N A
asteriskteam at digium.com
Wed Jul 27 12:50:21 CDT 2022
N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18910 )
Change subject: general: Improve logging levels of some log messages.
......................................................................
general: Improve logging levels of some log messages.
Adjusts some logging levels to be more or less important,
that is more prominent when actual problems occur and less
prominent for less noteworthy things.
ASTERISK-30153 #close
Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
---
M apps/app_stack.c
M apps/app_voicemail.c
M channels/chan_dahdi.c
M channels/chan_iax2.c
M main/manager.c
M main/stasis.c
M res/res_pjsip/config_transport.c
M res/res_pjsip/pjsip_options.c
8 files changed, 13 insertions(+), 11 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/10/18910/1
diff --git a/apps/app_stack.c b/apps/app_stack.c
index 557c6f1..a84a45c 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -1076,7 +1076,7 @@
ast_channel_name(chan), app_gosub, sub_args,
S_OR(pbx_builtin_getvar_helper(chan, "GOSUB_RETVAL"), ""));
} else {
- ast_log(LOG_NOTICE, "%s Abnormal '%s(%s)' exit. Popping routine return locations.\n",
+ ast_log(LOG_WARNING, "%s Abnormal '%s(%s)' exit. Popping routine return locations.\n",
ast_channel_name(chan), app_gosub, sub_args);
balance_stack(chan);
pbx_builtin_setvar_helper(chan, "GOSUB_RETVAL", "");
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 5436c87..510e15d 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11197,12 +11197,14 @@
password[0] = '\0';
} else {
if (ast_streamfile(chan, vm_password, ast_channel_language(chan))) {
- ast_log(AST_LOG_WARNING, "Unable to stream password file\n");
+ if (!ast_check_hangup(chan)) {
+ ast_log(AST_LOG_WARNING, "Unable to stream password file\n");
+ }
free_user(vmu);
return -1;
}
if (ast_readstring(chan, password, sizeof(password) - 1, 2000, 10000, "#") < 0) {
- ast_log(AST_LOG_WARNING, "Unable to read password\n");
+ ast_log(AST_LOG_NOTICE, "Unable to read password\n");
free_user(vmu);
return -1;
} else if (password[0] == '*') {
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 5adb797..8ce0526 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -19411,7 +19411,7 @@
report_alarms = REPORT_SPAN_ALARMS;
}
} else if (!(options & PROC_DAHDI_OPT_NOWARN) )
- ast_log(LOG_WARNING, "Ignoring any changes to '%s' (on reload) at line %d.\n", v->name, v->lineno);
+ ast_log(LOG_NOTICE, "Ignoring any changes to '%s' (on reload) at line %d.\n", v->name, v->lineno);
}
if (dahdichan) {
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 6ff1896..0b58a2b 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -3407,7 +3407,7 @@
/* Called with iaxsl held */
if (iaxdebug) {
- ast_debug(3, "Sending %u on %d/%d to %s\n", f->ts, callno, iaxs[callno]->peercallno, ast_sockaddr_stringify(&iaxs[callno]->addr));
+ ast_debug(8, "Sending %u on %d/%d to %s\n", f->ts, callno, iaxs[callno]->peercallno, ast_sockaddr_stringify(&iaxs[callno]->addr));
}
if (f->transfer) {
iax_outputframe(f, NULL, 0, &iaxs[callno]->transfer, f->datalen - sizeof(struct ast_iax2_full_hdr));
@@ -10363,7 +10363,7 @@
}
if (ast_test_flag64(iaxs[fr->callno], IAX_ENCRYPTED) && !decrypted) {
if (decrypt_frame(fr->callno, fh, &f, &res)) {
- ast_log(LOG_NOTICE, "Packet Decrypt Failed!\n");
+ ast_log(LOG_WARNING, "Packet Decrypt Failed!\n");
ast_variables_destroy(ies.vars);
ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
@@ -12033,7 +12033,7 @@
iaxs[fr->callno]->last = fr->ts;
#if 1
if (iaxdebug)
- ast_debug(3, "For call=%d, set last=%u\n", fr->callno, fr->ts);
+ ast_debug(8, "For call=%d, set last=%u\n", fr->callno, fr->ts);
#endif
}
diff --git a/main/manager.c b/main/manager.c
index 9645bd6..78a8eb9b 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -6204,7 +6204,7 @@
if (manager_debug) {
ast_verbose("<-- Examining AMI event: -->\n%s\n", eventdata);
} else {
- ast_debug(3, "Examining AMI event:\n%s\n", eventdata);
+ ast_debug(4, "Examining AMI event:\n%s\n", eventdata);
}
if (!ao2_container_count(s->session->whitefilters) && !ao2_container_count(s->session->blackfilters)) {
return 1; /* no filtering means match all */
diff --git a/main/stasis.c b/main/stasis.c
index cf89a99..a7cc7e2 100644
--- a/main/stasis.c
+++ b/main/stasis.c
@@ -2298,7 +2298,7 @@
ao2_cleanup(name_in_declined);
ao2_ref(cfg, -1);
if (res) {
- ast_log(LOG_NOTICE, "Declining to allocate Stasis message type '%s' due to configuration\n", name);
+ ast_debug(4, "Declining to allocate Stasis message type '%s' due to configuration\n", name);
}
return res;
}
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index 38bbecb..af0e0c9 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -742,7 +742,7 @@
res = PJ_SUCCESS;
} else if (!transport->allow_reload && perm_state) {
/* We inherit the transport from perm state, untouched */
- ast_log(LOG_WARNING, "Transport '%s' is not fully reloadable, not reloading: protocol, bind, TLS, TCP, ToS, or CoS options.\n", transport_id);
+ ast_log(LOG_NOTICE, "Transport '%s' is not fully reloadable, not reloading: protocol, bind, TLS, TCP, ToS, or CoS options.\n", transport_id);
temp_state->state->transport = perm_state->state->transport;
perm_state->state->transport = NULL;
temp_state->state->factory = perm_state->state->factory;
diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c
index 14013ad..4f48257 100644
--- a/res/res_pjsip/pjsip_options.c
+++ b/res/res_pjsip/pjsip_options.c
@@ -806,7 +806,7 @@
if (ast_sip_push_task(contact_callback_data->aor_options->serializer,
sip_options_contact_status_notify_task, contact_callback_data)) {
- ast_log(LOG_NOTICE, "Unable to queue contact status update for '%s' on AOR '%s', state will be incorrect\n",
+ ast_log(LOG_WARNING, "Unable to queue contact status update for '%s' on AOR '%s', state will be incorrect\n",
ast_sorcery_object_get_id(contact_callback_data->contact),
contact_callback_data->aor_options->name);
ao2_ref(contact_callback_data, -1);
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18910
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
Gerrit-Change-Number: 18910
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220727/34443527/attachment-0001.html>
More information about the asterisk-code-review
mailing list