]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
logging: expose the log level with a function
authorJason Ish <jason.ish@oisf.net>
Tue, 25 Aug 2020 18:47:10 +0000 (12:47 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 3 Sep 2020 11:02:18 +0000 (13:02 +0200)
The log level needs to exposed so Rust plugins can bootstrap
themselves with the correct login to SCLogNotice!(), etc work
as expected.

src/util-debug.c
src/util-debug.h

index 6a808bfe5bd9c4b6eff0e1041d36384cb787d718..60322b95a9e91cdfd71f4379fb675fbc75911bfc 100644 (file)
@@ -971,6 +971,11 @@ static inline void SCLogSetLogLevel(SCLogInitData *sc_lid, SCLogConfig *sc_lc)
     return;
 }
 
+SCLogLevel SCLogGetLogLevel(void)
+{
+    return sc_log_global_log_level;
+}
+
 static inline const char *SCLogGetDefaultLogFormat(void)
 {
     const char *prog_ver = GetProgramVersion();
index c9c7d6e30c23b610e3c28101982688c1c0bd6b3e..8d92d8bf8931f8bbdef1341cf07ceae5a1d6330b 100644 (file)
@@ -575,4 +575,6 @@ void SCLogRegisterTests(void);
 
 void SCLogLoadConfig(int daemon, int verbose);
 
+SCLogLevel SCLogGetLogLevel(void);
+
 #endif /* __UTIL_DEBUG_H__ */