diff options
author | krells <benoit.dereck-tricot@eyepea.eu> | 2018-01-09 18:29:48 +0100 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2018-01-18 20:36:14 -0600 |
commit | 77f2814d01fafba4bf251c177203cbd183999400 (patch) | |
tree | f9fd37f42203d1b7eb312dc66cfb9e5761d7cdcf /main/pbx.c | |
parent | b7a91630e453a787f111423f22ef60fa0246a4fb (diff) |
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
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/main/pbx.c b/main/pbx.c index b850e8efd..942c15c05 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -6207,15 +6207,14 @@ struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts, *local_contexts = tmp; ast_hashtab_insert_safe(contexts_table, tmp); /*put this context into the tree */ ast_unlock_contexts(); - ast_verb(3, "Registered extension context '%s'; registrar: %s\n", tmp->name, registrar); } else { tmp->next = *local_contexts; if (exttable) ast_hashtab_insert_immediate(exttable, tmp); /*put this context into the tree */ *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; } @@ -6245,7 +6244,7 @@ static void context_merge_incls_swits_igps_other_registrars(struct ast_context * { int idx; - 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 */ /* walk through includes */ for (idx = 0; idx < ast_context_includes_count(old); idx++) { @@ -6430,6 +6429,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_ struct ast_state_cb *thiscb; struct ast_hashtab_iter *iter; struct ao2_iterator i; + int ctx_count = 0; struct timeval begintime; struct timeval writelocktime; struct timeval endlocktime; @@ -6465,6 +6465,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_ iter = ast_hashtab_start_traversal(contexts_table); while ((tmp = ast_hashtab_next(iter))) { + ++ctx_count; context_merge(extcontexts, exttable, tmp, registrar); } ast_hashtab_end_traversal(iter); @@ -6640,6 +6641,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_ 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); } /* @@ -6699,7 +6701,7 @@ int ast_context_add_include2(struct ast_context *con, const char *value, ast_unlock_context(con); return -1; } - ast_verb(3, "Including context '%s' in context '%s'\n", + ast_debug(1, "Including context '%s' in context '%s'\n", ast_get_include_name(new_include), ast_get_context_name(con)); ast_unlock_context(con); @@ -7516,14 +7518,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; } |