From cdd52dc8cde9f6a745dda8130b33ff9bc17b5a7b Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 17 Dec 2022 07:25:12 +0100 Subject: [PATCH] detect/mpm: output cleanups --- src/detect-engine-mpm.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c index 9d47838274..e7b2b45e56 100644 --- a/src/detect-engine-mpm.c +++ b/src/detect-engine-mpm.c @@ -243,14 +243,10 @@ void DetectMpmInitializeAppMpms(DetectEngineCtx *de_ctx) shared = confshared; if (shared == 0) { - if (!(de_ctx->flags & DE_QUIET)) { - SCLogPerf("using unique mpm ctx' for %s", n->name); - } + SCLogDebug("using unique mpm ctx' for %s", n->name); n->sgh_mpm_context = MPM_CTX_FACTORY_UNIQUE_CONTEXT; } else { - if (!(de_ctx->flags & DE_QUIET)) { - SCLogPerf("using shared mpm ctx' for %s", n->name); - } + SCLogDebug("using shared mpm ctx' for %s", n->name); n->sgh_mpm_context = MpmFactoryRegisterMpmCtxProfile(de_ctx, n->name, n->sm_list); } @@ -472,14 +468,10 @@ void DetectMpmInitializeFrameMpms(DetectEngineCtx *de_ctx) shared = confshared; if (shared == 0) { - if (!(de_ctx->flags & DE_QUIET)) { - SCLogPerf("using unique mpm ctx' for %s", n->name); - } + SCLogDebug("using unique mpm ctx' for %s", n->name); n->sgh_mpm_context = MPM_CTX_FACTORY_UNIQUE_CONTEXT; } else { - if (!(de_ctx->flags & DE_QUIET)) { - SCLogPerf("using shared mpm ctx' for %s", n->name); - } + SCLogDebug("using shared mpm ctx' for %s", n->name); n->sgh_mpm_context = MpmFactoryRegisterMpmCtxProfile(de_ctx, n->name, n->sm_list); } @@ -645,14 +637,10 @@ void DetectMpmInitializePktMpms(DetectEngineCtx *de_ctx) shared = confshared; if (shared == 0) { - if (!(de_ctx->flags & DE_QUIET)) { - SCLogPerf("using unique mpm ctx' for %s", n->name); - } + SCLogDebug("using unique mpm ctx' for %s", n->name); n->sgh_mpm_context = MPM_CTX_FACTORY_UNIQUE_CONTEXT; } else { - if (!(de_ctx->flags & DE_QUIET)) { - SCLogPerf("using shared mpm ctx' for %s", n->name); - } + SCLogDebug("using shared mpm ctx' for %s", n->name); n->sgh_mpm_context = MpmFactoryRegisterMpmCtxProfile(de_ctx, n->name, n->sm_list); } @@ -705,10 +693,10 @@ static int32_t SetupBuiltinMpm(DetectEngineCtx *de_ctx, const char *name) int32_t ctx; if (shared == 0) { ctx = MPM_CTX_FACTORY_UNIQUE_CONTEXT; - SCLogPerf("using unique mpm ctx' for %s", name); + SCLogDebug("using unique mpm ctx' for %s", name); } else { ctx = MpmFactoryRegisterMpmCtxProfile(de_ctx, name, DETECT_SM_LIST_PMATCH); - SCLogPerf("using shared mpm ctx' for %s", name); + SCLogDebug("using shared mpm ctx' for %s", name); } return ctx; } -- 2.47.2