exceptions: use mix of logconfig/info/warning

Use a mix of SCLogConfig, Warning and Info.
This mix works as follows: when something unnexpected for the user
happens - for instance, the engine ignoring an invalid config value, we
use warning. For indicating the value for the master switch, which
happens only once, we use Info. For all the other cases, we use
SCLogConfig.

It is possible that SCLogConfig isn't showing at the moment, this is a
possible bug to investigate further.

Related to
Bug #5825
pull/9021/head
Juliana Fajardini 3 years ago committed by Victor Julien
parent 7f8536b81c
commit 69311ab02f

@ -118,7 +118,7 @@ static enum ExceptionPolicy SetIPSOption(
const char *option, const char *value_str, enum ExceptionPolicy p)
{
if (!EngineModeIsIPS()) {
SCLogConfig("%s: %s not a valid config in IDS mode. Ignoring it.", option, value_str);
SCLogWarning("%s: %s not a valid config in IDS mode. Ignoring it.", option, value_str);
return EXCEPTION_POLICY_NOT_SET;
}
return p;
@ -191,7 +191,8 @@ static enum ExceptionPolicy ExceptionPolicyMasterParse(const char *value)
policy = ExceptionPolicyConfigValueParse("exception-policy", value);
g_eps_have_exception_policy = true;
policy = SetIPSOption("exception-policy", value, policy);
SCLogConfig("exception-policy set to: %s", ExceptionPolicyEnumToString(policy));
SCLogInfo("exception-policy set to: %s", ExceptionPolicyEnumToString(policy));
return policy;
}

Loading…
Cancel
Save