mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Reduce startup/shutdown verbose logging
When started with a verbose level of 3, asterisk can emit over 1500
verbose message that serve no real purpose other than to fill up
logs. When asterisk shuts down, it emits another 1100 that are of
even less use. Since the testsuite runs asterisk with a verbose
level of 3, and asterisk starts and stops for every one of the 700+
tests, the number of log messages is staggering. Besides taking up
resources, it also makes it hard to debug failing tests.
This commit changes the log level for those verbose messages to 5
instead of 3 which reduces the number of log messages to only a
handful. Of course, NOTICE, WARNING and ERROR message are
unaffected.
There's also one other minor change...
ast_context_remove_extension_callerid2() logs a DEBUG message
instead of an ERROR if the extension you're deleting doesn't exist.
The pjsip_config_wizard calls that function to clean up the config
and has been triggering that annoying error message for years.
Resolves: #582
(cherry picked from commit a433ed0d5a
)
This commit is contained in:
committed by
Asterisk Development Team
parent
bf6a367955
commit
6df5fbee65
16
main/pbx.c
16
main/pbx.c
@@ -5068,7 +5068,7 @@ int ast_context_remove_extension_callerid2(struct ast_context *con, const char *
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR,"Could not find priority %d of exten %s in context %s!\n",
|
||||
ast_debug(3,"Could not find priority %d of exten %s in context %s!\n",
|
||||
priority, exten->name, con->name);
|
||||
}
|
||||
}
|
||||
@@ -6685,20 +6685,20 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
|
||||
|
||||
ft = ast_tvdiff_us(writelocktime, begintime);
|
||||
ft /= 1000000.0;
|
||||
ast_verb(3,"Time to scan old dialplan and merge leftovers back into the new: %8.6f sec\n", ft);
|
||||
ast_verb(5,"Time to scan old dialplan and merge leftovers back into the new: %8.6f sec\n", ft);
|
||||
|
||||
ft = ast_tvdiff_us(endlocktime, writelocktime);
|
||||
ft /= 1000000.0;
|
||||
ast_verb(3,"Time to restore hints and swap in new dialplan: %8.6f sec\n", ft);
|
||||
ast_verb(5,"Time to restore hints and swap in new dialplan: %8.6f sec\n", ft);
|
||||
|
||||
ft = ast_tvdiff_us(enddeltime, endlocktime);
|
||||
ft /= 1000000.0;
|
||||
ast_verb(3,"Time to delete the old dialplan: %8.6f sec\n", ft);
|
||||
ast_verb(5,"Time to delete the old dialplan: %8.6f sec\n", ft);
|
||||
|
||||
ft = ast_tvdiff_us(enddeltime, begintime);
|
||||
ft /= 1000000.0;
|
||||
ast_verb(3,"Total time merge_contexts_delete: %8.6f sec\n", ft);
|
||||
ast_verb(3, "%s successfully loaded %d contexts (enable debug for details).\n", registrar, ctx_count);
|
||||
ast_verb(5,"Total time merge_contexts_delete: %8.6f sec\n", ft);
|
||||
ast_verb(5, "%s successfully loaded %d contexts (enable debug for details).\n", registrar, ctx_count);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -8179,7 +8179,7 @@ void __ast_context_destroy(struct ast_context *list, struct ast_hashtab *context
|
||||
if (!prio_item->registrar || strcmp(prio_item->registrar, registrar) != 0) {
|
||||
continue;
|
||||
}
|
||||
ast_verb(3, "Remove %s/%s/%d, registrar=%s; con=%s(%p); con->root=%p\n",
|
||||
ast_verb(5, "Remove %s/%s/%d, registrar=%s; con=%s(%p); con->root=%p\n",
|
||||
tmp->name, prio_item->name, prio_item->priority, registrar, con? con->name : "<nil>", con, con? con->root_table: NULL);
|
||||
ast_copy_string(extension, prio_item->exten, sizeof(extension));
|
||||
if (prio_item->cidmatch) {
|
||||
@@ -8473,7 +8473,7 @@ int load_pbx(void)
|
||||
/* Initialize the PBX */
|
||||
ast_verb(1, "Asterisk PBX Core Initializing\n");
|
||||
|
||||
ast_verb(2, "Registering builtin functions:\n");
|
||||
ast_verb(5, "Registering builtin functions:\n");
|
||||
ast_cli_register_multiple(pbx_cli, ARRAY_LEN(pbx_cli));
|
||||
__ast_custom_function_register(&exception_function, NULL);
|
||||
__ast_custom_function_register(&testtime_function, NULL);
|
||||
|
Reference in New Issue
Block a user