From: Jason Ish Date: Tue, 25 Aug 2020 18:47:10 +0000 (-0600) Subject: logging: expose the log level with a function X-Git-Tag: suricata-6.0.0-rc1~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87a91e6aa87c8b4d740fbd74fc57ebd88e586ff2;p=thirdparty%2Fsuricata.git logging: expose the log level with a function The log level needs to exposed so Rust plugins can bootstrap themselves with the correct login to SCLogNotice!(), etc work as expected. --- diff --git a/src/util-debug.c b/src/util-debug.c index 6a808bfe5b..60322b95a9 100644 --- a/src/util-debug.c +++ b/src/util-debug.c @@ -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(); diff --git a/src/util-debug.h b/src/util-debug.h index c9c7d6e30c..8d92d8bf89 100644 --- a/src/util-debug.h +++ b/src/util-debug.h @@ -575,4 +575,6 @@ void SCLogRegisterTests(void); void SCLogLoadConfig(int daemon, int verbose); +SCLogLevel SCLogGetLogLevel(void); + #endif /* __UTIL_DEBUG_H__ */