[svn-commits] seanbright: trunk r410994 - in /trunk: pbx/ res/ael/ utils/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 21 10:50:18 CDT 2014


Author: seanbright
Date: Fri Mar 21 10:50:11 2014
New Revision: 410994

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410994
Log:
Make the AEL load process less chatty.

Switched a bunch of LOG_NOTICEs to ast_debug.  This time without breaking the
build.

Modified:
    trunk/pbx/pbx_ael.c
    trunk/res/ael/ael.flex
    trunk/res/ael/ael_lex.c
    trunk/utils/Makefile

Modified: trunk/pbx/pbx_ael.c
URL: http://svnview.digium.com/svn/asterisk/trunk/pbx/pbx_ael.c?view=diff&rev=410994&r1=410993&r2=410994
==============================================================================
--- trunk/pbx/pbx_ael.c (original)
+++ trunk/pbx/pbx_ael.c Fri Mar 21 10:50:11 2014
@@ -161,7 +161,7 @@
 	
 	struct pval *parse_tree;
 
-	ast_log(LOG_NOTICE, "Starting AEL load process.\n");
+	ast_debug(1, "Starting AEL load process.\n");
 	if (config[0] == '/')
 		rfilename = (char *)config;
 	else {
@@ -174,25 +174,25 @@
 	}
 	
 	parse_tree = ael2_parse(rfilename, &errs);
-	ast_log(LOG_NOTICE, "AEL load process: parsed config file name '%s'.\n", rfilename);
+	ast_debug(1, "AEL load process: parsed config file name '%s'.\n", rfilename);
 	ael2_semantic_check(parse_tree, &sem_err, &sem_warn, &sem_note);
 	if (errs == 0 && sem_err == 0) {
-		ast_log(LOG_NOTICE, "AEL load process: checked config file name '%s'.\n", rfilename);
+		ast_debug(1, "AEL load process: checked config file name '%s'.\n", rfilename);
 		local_table = ast_hashtab_create(11, ast_hashtab_compare_contexts, ast_hashtab_resize_java, ast_hashtab_newsize_java, ast_hashtab_hash_contexts, 0);
 		if (ast_compile_ael2(&local_contexts, local_table, parse_tree)) {
 			ast_log(LOG_ERROR, "AEL compile failed! Aborting.\n");
 			destroy_pval(parse_tree); /* free up the memory */
 			return AST_MODULE_LOAD_DECLINE;
 		}
-		ast_log(LOG_NOTICE, "AEL load process: compiled config file name '%s'.\n", rfilename);
+		ast_debug(1, "AEL load process: compiled config file name '%s'.\n", rfilename);
 		
 		ast_merge_contexts_and_delete(&local_contexts, local_table, registrar);
 		local_table = NULL; /* it's the dialplan global now */
 		local_contexts = NULL;
-		ast_log(LOG_NOTICE, "AEL load process: merged config file name '%s'.\n", rfilename);
+		ast_debug(1, "AEL load process: merged config file name '%s'.\n", rfilename);
 		for (con = ast_walk_contexts(NULL); con; con = ast_walk_contexts(con))
 			ast_context_verify_includes(con);
-		ast_log(LOG_NOTICE, "AEL load process: verified config file name '%s'.\n", rfilename);
+		ast_debug(1, "AEL load process: verified config file name '%s'.\n", rfilename);
 	} else {
 		ast_log(LOG_ERROR, "Sorry, but %d syntax errors and %d semantic errors were detected. It doesn't make sense to compile.\n", errs, sem_err);
 		destroy_pval(parse_tree); /* free up the memory */

Modified: trunk/res/ael/ael.flex
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ael/ael.flex?view=diff&rev=410994&r1=410993&r2=410994
==============================================================================
--- trunk/res/ael/ael.flex (original)
+++ trunk/res/ael/ael.flex Fri Mar 21 10:50:11 2014
@@ -885,7 +885,7 @@
 				ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
 			}			
 			buffer[stats.st_size] = 0;
-			ast_log(LOG_NOTICE,"  --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
+			ast_debug(1, "  --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
 			fclose(in1);
 			if (include_stack[include_stack_index].fname) {
 			   	free(include_stack[include_stack_index].fname);

Modified: trunk/res/ael/ael_lex.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ael/ael_lex.c?view=diff&rev=410994&r1=410993&r2=410994
==============================================================================
--- trunk/res/ael/ael_lex.c (original)
+++ trunk/res/ael/ael_lex.c Fri Mar 21 10:50:11 2014
@@ -3458,7 +3458,7 @@
 				ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
 			}			
 			buffer[stats.st_size] = 0;
-			ast_log(LOG_NOTICE,"  --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
+			ast_debug(1, "  --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
 			fclose(in1);
 			if (include_stack[include_stack_index].fname) {
 			   	free(include_stack[include_stack_index].fname);

Modified: trunk/utils/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/utils/Makefile?view=diff&rev=410994&r1=410993&r2=410994
==============================================================================
--- trunk/utils/Makefile (original)
+++ trunk/utils/Makefile Fri Mar 21 10:50:11 2014
@@ -142,10 +142,16 @@
 pbx_ael.c: $(ASTTOPDIR)/pbx/pbx_ael.c
 	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
+	$(ECHO_PREFIX) echo "   [SED] $@"
+	$(CMD_PREFIX) sed 's/ast_debug([[:digit:]][[:digit:]]*/ast_log(LOG_DEBUG/' "$@" > "$@.new"
+	$(CMD_PREFIX) mv "$@.new" "$@"
 
 aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
 	$(ECHO_PREFIX) echo "   [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
 	$(CMD_PREFIX) cp "$<" "$@"
+	$(ECHO_PREFIX) echo "   [SED] $@"
+	$(CMD_PREFIX) sed 's/ast_debug([[:digit:]][[:digit:]]*/ast_log(LOG_DEBUG/' "$@" > "$@.new"
+	$(CMD_PREFIX) mv "$@.new" "$@"
 
 aelparse.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res -Wno-unused
 aelparse: LIBS+=-lm




More information about the svn-commits mailing list