From: Victor Julien Date: Wed, 9 Oct 2013 11:45:55 +0000 (+0200) Subject: Clean up rule reload logging X-Git-Tag: suricata-2.0beta2~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a26243a23c4a99330b8f5dca6bdc148b4ef32eb0;p=thirdparty%2Fsuricata.git Clean up rule reload logging --- diff --git a/src/detect-engine.c b/src/detect-engine.c index 22827ce531..759cbcc62e 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -403,7 +403,7 @@ static void *DetectEngineLiveRuleSwap(void *arg) SCLogWarning(SC_ERR_THREAD_INIT, "Unable to set thread name"); } - SCLogInfo("===== Starting live rule swap triggered by user signal USR2 ====="); + SCLogNotice("rule reload starting"); ThreadVars *tv_local = (ThreadVars *)arg; @@ -457,8 +457,7 @@ static void *DetectEngineLiveRuleSwap(void *arg) if (suricata_ctl_flags != 0) { TmThreadsSetFlag(tv_local, THV_CLOSED); - SCLogInfo("===== Live rule swap premature exit, since " - "engine is in shutdown phase ====="); + SCLogInfo("rule reload interupted by engine shutdown"); UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2); SCMutexUnlock(&tv_root_lock); @@ -503,7 +502,7 @@ static void *DetectEngineLiveRuleSwap(void *arg) DetectEngineCtxFree(de_ctx); SCLogError(SC_ERR_LIVE_RULE_SWAP, "Failure encountered while " "loading new ruleset with live swap."); - SCLogInfo("===== Live rule swap FAILURE ====="); + SCLogError(SC_ERR_LIVE_RULE_SWAP, "rule reload failed"); TmThreadsSetFlag(tv_local, THV_CLOSED); UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2); pthread_exit(NULL); @@ -526,8 +525,7 @@ static void *DetectEngineLiveRuleSwap(void *arg) if (suricata_ctl_flags != 0) { TmThreadsSetFlag(tv_local, THV_CLOSED); - SCLogInfo("===== Live rule swap premature exit, since " - "engine is in shutdown phase ====="); + SCLogInfo("rule reload interupted by engine shutdown"); UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2); SCMutexUnlock(&tv_root_lock); @@ -566,8 +564,7 @@ static void *DetectEngineLiveRuleSwap(void *arg) if (suricata_ctl_flags != 0) { TmThreadsSetFlag(tv_local, THV_CLOSED); - SCLogInfo("===== Live rule swap premature exit, since " - "engine is in shutdown phase ====="); + SCLogInfo("rule reload interupted by engine shutdown"); UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2); SCMutexUnlock(&tv_root_lock); @@ -669,7 +666,7 @@ static void *DetectEngineLiveRuleSwap(void *arg) TmThreadsSetFlag(tv_local, THV_CLOSED); - SCLogInfo("===== Live rule swap DONE ====="); + SCLogNotice("rule reload complete"); pthread_exit(NULL);