mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
pbx: Reduce verbosity while loading extensions
Each time the dial plan is reloaded, a lot of logs like these are generated: "Added extension 'XXXXX' priority 1 to YYYYYYYYYYY" This patch changes the log level for those logs. ASTERISK-27084 Change-Id: I5662902161c50890997ddc56835d4cafb456c529
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -12,6 +12,12 @@
|
|||||||
--- Functionality changes from Asterisk 13.19.0 to Asterisk 13.20.0 ----------
|
--- Functionality changes from Asterisk 13.19.0 to Asterisk 13.20.0 ----------
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Core
|
||||||
|
------------------
|
||||||
|
* During dialplan reload log messages are produced for each context,
|
||||||
|
extension and include. These messages are no longer printed by the
|
||||||
|
verbose loggers, they are now only logged as debug messages.
|
||||||
|
|
||||||
app_followme
|
app_followme
|
||||||
------------------
|
------------------
|
||||||
* Added a new prompt, connecting-prompt, which will be played
|
* Added a new prompt, connecting-prompt, which will be played
|
||||||
|
|||||||
@@ -2193,7 +2193,6 @@ static struct ast_config *config_text_file_load(const char *database, const char
|
|||||||
/* If we get to this point, then we're loading regardless */
|
/* If we get to this point, then we're loading regardless */
|
||||||
ast_clear_flag(&flags, CONFIG_FLAG_FILEUNCHANGED);
|
ast_clear_flag(&flags, CONFIG_FLAG_FILEUNCHANGED);
|
||||||
ast_debug(1, "Parsing %s\n", fn);
|
ast_debug(1, "Parsing %s\n", fn);
|
||||||
ast_verb(2, "Parsing '%s': Found\n", fn);
|
|
||||||
while (!feof(f)) {
|
while (!feof(f)) {
|
||||||
lineno++;
|
lineno++;
|
||||||
if (fgets(buf, sizeof(buf), f)) {
|
if (fgets(buf, sizeof(buf), f)) {
|
||||||
|
|||||||
18
main/pbx.c
18
main/pbx.c
@@ -6142,15 +6142,14 @@ struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts,
|
|||||||
*local_contexts = tmp;
|
*local_contexts = tmp;
|
||||||
ast_hashtab_insert_safe(contexts_table, tmp); /*put this context into the tree */
|
ast_hashtab_insert_safe(contexts_table, tmp); /*put this context into the tree */
|
||||||
ast_unlock_contexts();
|
ast_unlock_contexts();
|
||||||
ast_verb(3, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
|
|
||||||
} else {
|
} else {
|
||||||
tmp->next = *local_contexts;
|
tmp->next = *local_contexts;
|
||||||
if (exttable)
|
if (exttable)
|
||||||
ast_hashtab_insert_immediate(exttable, tmp); /*put this context into the tree */
|
ast_hashtab_insert_immediate(exttable, tmp); /*put this context into the tree */
|
||||||
|
|
||||||
*local_contexts = tmp;
|
*local_contexts = tmp;
|
||||||
ast_verb(3, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
|
|
||||||
}
|
}
|
||||||
|
ast_debug(1, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6177,7 +6176,7 @@ static void context_merge_incls_swits_igps_other_registrars(struct ast_context *
|
|||||||
struct ast_ignorepat *ip;
|
struct ast_ignorepat *ip;
|
||||||
struct ast_sw *sw;
|
struct ast_sw *sw;
|
||||||
|
|
||||||
ast_verb(3, "merging incls/swits/igpats from old(%s) to new(%s) context, registrar = %s\n", ast_get_context_name(old), ast_get_context_name(new), registrar);
|
ast_debug(1, "merging incls/swits/igpats from old(%s) to new(%s) context, registrar = %s\n", ast_get_context_name(old), ast_get_context_name(new), registrar);
|
||||||
/* copy in the includes, switches, and ignorepats */
|
/* copy in the includes, switches, and ignorepats */
|
||||||
/* walk through includes */
|
/* walk through includes */
|
||||||
for (i = NULL; (i = ast_walk_context_includes(old, i)) ; ) {
|
for (i = NULL; (i = ast_walk_context_includes(old, i)) ; ) {
|
||||||
@@ -6310,6 +6309,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
|
|||||||
struct ast_state_cb *thiscb;
|
struct ast_state_cb *thiscb;
|
||||||
struct ast_hashtab_iter *iter;
|
struct ast_hashtab_iter *iter;
|
||||||
struct ao2_iterator i;
|
struct ao2_iterator i;
|
||||||
|
int ctx_count = 0;
|
||||||
struct timeval begintime;
|
struct timeval begintime;
|
||||||
struct timeval writelocktime;
|
struct timeval writelocktime;
|
||||||
struct timeval endlocktime;
|
struct timeval endlocktime;
|
||||||
@@ -6342,6 +6342,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
|
|||||||
|
|
||||||
iter = ast_hashtab_start_traversal(contexts_table);
|
iter = ast_hashtab_start_traversal(contexts_table);
|
||||||
while ((tmp = ast_hashtab_next(iter))) {
|
while ((tmp = ast_hashtab_next(iter))) {
|
||||||
|
++ctx_count;
|
||||||
context_merge(extcontexts, exttable, tmp, registrar);
|
context_merge(extcontexts, exttable, tmp, registrar);
|
||||||
}
|
}
|
||||||
ast_hashtab_end_traversal(iter);
|
ast_hashtab_end_traversal(iter);
|
||||||
@@ -6514,6 +6515,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
|
|||||||
ft = ast_tvdiff_us(enddeltime, begintime);
|
ft = ast_tvdiff_us(enddeltime, begintime);
|
||||||
ft /= 1000000.0;
|
ft /= 1000000.0;
|
||||||
ast_verb(3,"Total time merge_contexts_delete: %8.6f sec\n", ft);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -6591,7 +6593,7 @@ int ast_context_add_include2(struct ast_context *con, const char *value,
|
|||||||
il->next = new_include;
|
il->next = new_include;
|
||||||
else
|
else
|
||||||
con->includes = new_include;
|
con->includes = new_include;
|
||||||
ast_verb(3, "Including context '%s' in context '%s'\n", new_include->name, ast_get_context_name(con));
|
ast_debug(1, "Including context '%s' in context '%s'\n", new_include->name, ast_get_context_name(con));
|
||||||
|
|
||||||
ast_unlock_context(con);
|
ast_unlock_context(con);
|
||||||
|
|
||||||
@@ -7432,14 +7434,6 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp->matchcid == AST_EXT_MATCHCID_ON) {
|
|
||||||
ast_verb(3, "Added extension '%s' priority %d (CID match '%s') to %s\n",
|
|
||||||
tmp->name, tmp->priority, tmp->cidmatch_display, con->name);
|
|
||||||
} else {
|
|
||||||
ast_verb(3, "Added extension '%s' priority %d to %s\n",
|
|
||||||
tmp->name, tmp->priority, con->name);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user