mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +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 57d30c17b3)
			
			
This commit is contained in:
		
				
					committed by
					
						 Asterisk Development Team
						Asterisk Development Team
					
				
			
			
				
	
			
			
			
						parent
						
							461411338b
						
					
				
				
					commit
					d9e4b080f2
				
			| @@ -3848,7 +3848,7 @@ int AST_OPTIONAL_API_NAME(ast_agi_register)(struct ast_module *mod, agi_command | ||||
| 		AST_RWLIST_WRLOCK(&agi_commands); | ||||
| 		AST_LIST_INSERT_TAIL(&agi_commands, cmd, list); | ||||
| 		AST_RWLIST_UNLOCK(&agi_commands); | ||||
| 		ast_verb(2, "AGI Command '%s' registered\n",fullcmd); | ||||
| 		ast_verb(5, "AGI Command '%s' registered\n",fullcmd); | ||||
| 		return 1; | ||||
| 	} else { | ||||
| 		ast_log(LOG_WARNING, "Command already registered!\n"); | ||||
| @@ -3887,7 +3887,7 @@ int AST_OPTIONAL_API_NAME(ast_agi_unregister)(agi_command *cmd) | ||||
| 	AST_RWLIST_TRAVERSE_SAFE_END; | ||||
| 	AST_RWLIST_UNLOCK(&agi_commands); | ||||
| 	if (unregistered) { | ||||
| 		ast_verb(2, "AGI Command '%s' unregistered\n",fullcmd); | ||||
| 		ast_verb(5, "AGI Command '%s' unregistered\n",fullcmd); | ||||
| 	} | ||||
| 	return unregistered; | ||||
| } | ||||
|   | ||||
| @@ -326,13 +326,13 @@ struct ast_frame *ast_audiosocket_receive_frame(const int svc) | ||||
|  | ||||
| static int load_module(void) | ||||
| { | ||||
| 	ast_verb(1, "Loading AudioSocket Support module\n"); | ||||
| 	ast_verb(5, "Loading AudioSocket Support module\n"); | ||||
| 	return AST_MODULE_LOAD_SUCCESS; | ||||
| } | ||||
|  | ||||
| static int unload_module(void) | ||||
| { | ||||
| 	ast_verb(1, "Unloading AudioSocket Support module\n"); | ||||
| 	ast_verb(5, "Unloading AudioSocket Support module\n"); | ||||
| 	return AST_MODULE_LOAD_SUCCESS; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -236,7 +236,7 @@ static void load_config(int reload) | ||||
| 				continue; | ||||
| 			} | ||||
| 			ao2_link(cli_aliases, alias); | ||||
| 			ast_verb(2, "Aliased CLI command '%s' to '%s'\n", v1->name, v1->value); | ||||
| 			ast_verb(5, "Aliased CLI command '%s' to '%s'\n", v1->name, v1->value); | ||||
| 			ao2_ref(alias, -1); | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -257,7 +257,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_server_add_protocol2)(struct ast_websock | ||||
| 	ao2_link_flags(server->protocols, protocol, OBJ_NOLOCK); | ||||
| 	ao2_unlock(server->protocols); | ||||
|  | ||||
| 	ast_verb(2, "WebSocket registered sub-protocol '%s'\n", protocol->name); | ||||
| 	ast_verb(5, "WebSocket registered sub-protocol '%s'\n", protocol->name); | ||||
| 	ao2_ref(protocol, -1); | ||||
|  | ||||
| 	return 0; | ||||
| @@ -279,7 +279,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_server_remove_protocol)(struct ast_webso | ||||
| 	ao2_unlink(server->protocols, protocol); | ||||
| 	ao2_ref(protocol, -1); | ||||
|  | ||||
| 	ast_verb(2, "WebSocket unregistered sub-protocol '%s'\n", name); | ||||
| 	ast_verb(5, "WebSocket unregistered sub-protocol '%s'\n", name); | ||||
|  | ||||
| 	return 0; | ||||
| } | ||||
|   | ||||
| @@ -329,14 +329,14 @@ int ast_speech_register(struct ast_speech_engine *engine) | ||||
| 		return -1; | ||||
| 	} | ||||
|  | ||||
| 	ast_verb(2, "Registered speech recognition engine '%s'\n", engine->name); | ||||
| 	ast_verb(5, "Registered speech recognition engine '%s'\n", engine->name); | ||||
|  | ||||
| 	/* Add to the engine linked list and make default if needed */ | ||||
| 	AST_RWLIST_WRLOCK(&engines); | ||||
| 	AST_RWLIST_INSERT_HEAD(&engines, engine, list); | ||||
| 	if (!default_engine) { | ||||
| 		default_engine = engine; | ||||
| 		ast_verb(2, "Made '%s' the default speech recognition engine\n", engine->name); | ||||
| 		ast_verb(5, "Made '%s' the default speech recognition engine\n", engine->name); | ||||
| 	} | ||||
| 	AST_RWLIST_UNLOCK(&engines); | ||||
|  | ||||
| @@ -366,7 +366,7 @@ struct ast_speech_engine *ast_speech_unregister2(const char *engine_name) | ||||
| 			if (engine == default_engine) { | ||||
| 				default_engine = AST_RWLIST_FIRST(&engines); | ||||
| 			} | ||||
| 			ast_verb(2, "Unregistered speech recognition engine '%s'\n", engine_name); | ||||
| 			ast_verb(5, "Unregistered speech recognition engine '%s'\n", engine_name); | ||||
| 			/* All went well */ | ||||
| 			break; | ||||
| 		} | ||||
| @@ -396,7 +396,7 @@ void ast_speech_unregister_engines( | ||||
| 			if (engine == default_engine) { | ||||
| 				default_engine = AST_RWLIST_FIRST(&engines); | ||||
| 			} | ||||
| 			ast_verb(2, "Unregistered speech recognition engine '%s'\n", engine->name); | ||||
| 			ast_verb(5, "Unregistered speech recognition engine '%s'\n", engine->name); | ||||
| 			/* All went well */ | ||||
| 			if (on_unregistered) { | ||||
| 				on_unregistered(engine); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user