]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
exceptions: use mix of logconfig/info/warning
authorJuliana Fajardini <jufajardini@oisf.net>
Thu, 1 Jun 2023 23:33:18 +0000 (20:33 -0300)
committerVictor Julien <vjulien@oisf.net>
Tue, 13 Jun 2023 07:20:05 +0000 (09:20 +0200)
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

src/util-exception-policy.c

index 96a0d584e225fc69f98b3674a884963d18e13ae5..576cfa6250b9b3ea9d455f52dda7522daa61abf9 100644 (file)
@@ -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;
 }