mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +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
This commit is contained in:
@@ -597,20 +597,20 @@ static int parse_config(int reload)
|
||||
if (!strcasecmp(var->name, "quality")) {
|
||||
res = abs(atoi(var->value));
|
||||
if (res > -1 && res < 11) {
|
||||
ast_verb(3, "CODEC SPEEX: Setting Quality to %d\n",res);
|
||||
ast_verb(5, "CODEC SPEEX: Setting Quality to %d\n",res);
|
||||
quality = res;
|
||||
} else
|
||||
ast_log(LOG_ERROR,"Error Quality must be 0-10\n");
|
||||
} else if (!strcasecmp(var->name, "complexity")) {
|
||||
res = abs(atoi(var->value));
|
||||
if (res > -1 && res < 11) {
|
||||
ast_verb(3, "CODEC SPEEX: Setting Complexity to %d\n",res);
|
||||
ast_verb(5, "CODEC SPEEX: Setting Complexity to %d\n",res);
|
||||
complexity = res;
|
||||
} else
|
||||
ast_log(LOG_ERROR,"Error! Complexity must be 0-10\n");
|
||||
} else if (!strcasecmp(var->name, "vbr_quality")) {
|
||||
if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0 && res_f <= 10) {
|
||||
ast_verb(3, "CODEC SPEEX: Setting VBR Quality to %f\n",res_f);
|
||||
ast_verb(5, "CODEC SPEEX: Setting VBR Quality to %f\n",res_f);
|
||||
vbr_quality = res_f;
|
||||
} else
|
||||
ast_log(LOG_ERROR,"Error! VBR Quality must be 0-10\n");
|
||||
@@ -618,62 +618,62 @@ static int parse_config(int reload)
|
||||
ast_log(LOG_ERROR,"Error! ABR Quality setting obsolete, set ABR to desired bitrate\n");
|
||||
} else if (!strcasecmp(var->name, "enhancement")) {
|
||||
enhancement = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: Perceptual Enhancement Mode. [%s]\n",enhancement ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: Perceptual Enhancement Mode. [%s]\n",enhancement ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "vbr")) {
|
||||
vbr = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: VBR Mode. [%s]\n",vbr ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: VBR Mode. [%s]\n",vbr ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "abr")) {
|
||||
res = abs(atoi(var->value));
|
||||
if (res >= 0) {
|
||||
if (res > 0)
|
||||
ast_verb(3, "CODEC SPEEX: Setting ABR target bitrate to %d\n",res);
|
||||
ast_verb(5, "CODEC SPEEX: Setting ABR target bitrate to %d\n",res);
|
||||
else
|
||||
ast_verb(3, "CODEC SPEEX: Disabling ABR\n");
|
||||
ast_verb(5, "CODEC SPEEX: Disabling ABR\n");
|
||||
abr = res;
|
||||
} else
|
||||
ast_log(LOG_ERROR,"Error! ABR target bitrate must be >= 0\n");
|
||||
} else if (!strcasecmp(var->name, "vad")) {
|
||||
vad = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: VAD Mode. [%s]\n",vad ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: VAD Mode. [%s]\n",vad ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "dtx")) {
|
||||
dtx = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: DTX Mode. [%s]\n",dtx ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: DTX Mode. [%s]\n",dtx ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "preprocess")) {
|
||||
preproc = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: Preprocessing. [%s]\n",preproc ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: Preprocessing. [%s]\n",preproc ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "pp_vad")) {
|
||||
pp_vad = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: Preprocessor VAD. [%s]\n",pp_vad ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: Preprocessor VAD. [%s]\n",pp_vad ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "pp_agc")) {
|
||||
pp_agc = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: Preprocessor AGC. [%s]\n",pp_agc ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: Preprocessor AGC. [%s]\n",pp_agc ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "pp_agc_level")) {
|
||||
if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) {
|
||||
ast_verb(3, "CODEC SPEEX: Setting preprocessor AGC Level to %f\n",res_f);
|
||||
ast_verb(5, "CODEC SPEEX: Setting preprocessor AGC Level to %f\n",res_f);
|
||||
pp_agc_level = res_f;
|
||||
} else
|
||||
ast_log(LOG_ERROR,"Error! Preprocessor AGC Level must be >= 0\n");
|
||||
} else if (!strcasecmp(var->name, "pp_denoise")) {
|
||||
pp_denoise = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: Preprocessor Denoise. [%s]\n",pp_denoise ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: Preprocessor Denoise. [%s]\n",pp_denoise ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "pp_dereverb")) {
|
||||
pp_dereverb = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: Preprocessor Dereverb. [%s]\n",pp_dereverb ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: Preprocessor Dereverb. [%s]\n",pp_dereverb ? "on" : "off");
|
||||
} else if (!strcasecmp(var->name, "pp_dereverb_decay")) {
|
||||
if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) {
|
||||
ast_verb(3, "CODEC SPEEX: Setting preprocessor Dereverb Decay to %f\n",res_f);
|
||||
ast_verb(5, "CODEC SPEEX: Setting preprocessor Dereverb Decay to %f\n",res_f);
|
||||
pp_dereverb_decay = res_f;
|
||||
} else
|
||||
ast_log(LOG_ERROR,"Error! Preprocessor Dereverb Decay must be >= 0\n");
|
||||
} else if (!strcasecmp(var->name, "pp_dereverb_level")) {
|
||||
if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) {
|
||||
ast_verb(3, "CODEC SPEEX: Setting preprocessor Dereverb Level to %f\n",res_f);
|
||||
ast_verb(5, "CODEC SPEEX: Setting preprocessor Dereverb Level to %f\n",res_f);
|
||||
pp_dereverb_level = res_f;
|
||||
} else
|
||||
ast_log(LOG_ERROR,"Error! Preprocessor Dereverb Level must be >= 0\n");
|
||||
} else if (!strcasecmp(var->name, "experimental_rtcp_feedback")) {
|
||||
exp_rtcp_fb = ast_true(var->value) ? 1 : 0;
|
||||
ast_verb(3, "CODEC SPEEX: Experimental RTCP Feedback. [%s]\n",exp_rtcp_fb ? "on" : "off");
|
||||
ast_verb(5, "CODEC SPEEX: Experimental RTCP Feedback. [%s]\n",exp_rtcp_fb ? "on" : "off");
|
||||
}
|
||||
}
|
||||
ast_config_destroy(cfg);
|
||||
|
Reference in New Issue
Block a user