]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util/debug: expose more raw logging macros
authorJason Ish <jason.ish@oisf.net>
Mon, 2 Jun 2025 16:03:27 +0000 (10:03 -0600)
committerVictor Julien <victor@inliniac.net>
Wed, 4 Jun 2025 07:39:51 +0000 (09:39 +0200)
Add raw logging macros for config, perf and debug.

src/util-debug.h

index 9a5f077954fde566eeddb4a4c7b4d9df01dd7d2e..2279b8532787c4343e67af7bf8f8693e699c9275 100644 (file)
@@ -228,7 +228,12 @@ void SCLogErr(int x, const char *file, const char *func, const int line, const c
 
 #define SCLogConfig(...)                                                                           \
     SCLog(SC_LOG_CONFIG, __FILE__, __FUNCTION__, __LINE__, _sc_module, __VA_ARGS__)
+#define SCLogConfigRaw(file, func, line, ...)                                                      \
+    SCLog(SC_LOG_CONFIG, (file), (func), (line), _sc_module, __VA_ARGS__)
+
 #define SCLogPerf(...) SCLog(SC_LOG_PERF, __FILE__, __FUNCTION__, __LINE__, _sc_module, __VA_ARGS__)
+#define SCLogPerfRaw(file, func, line, ...)                                                        \
+    SCLog(SC_LOG_PERF, (file), (func), (line), _sc_module, __VA_ARGS__)
 
 /**
  * \brief Macro used to log NOTICE messages.
@@ -303,6 +308,8 @@ void SCLogErr(int x, const char *file, const char *func, const int line, const c
  */
 #define SCLogDebug(...)                                                                            \
     SCLog(SC_LOG_DEBUG, __FILE__, __FUNCTION__, __LINE__, _sc_module, __VA_ARGS__)
+#define SCLogDebugRaw(file, func, line, ...)                                                       \
+    SCLog(SC_LOG_DEBUG, (file), (func), (line), _sc_module, __VA_ARGS__)
 
 /**
  * \brief Macro used to log debug messages on function entry.  Comes under the