summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/logs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/logs.h b/src/core/logs.h
index a58a5a8..e8df8bd 100644
--- a/src/core/logs.h
+++ b/src/core/logs.h
@@ -130,6 +130,15 @@ void log_variadic_message(LogMessageType, const char *, ...);
} \
while (0)
+#define LOG_ERROR_REGCOMP(preg, errcode) \
+ do \
+ { \
+ char __msg[1024]; \
+ regerror(errcode, preg, __msg, sizeof(__msg)); \
+ log_variadic_message(LMT_EXT_ERROR, "[%s:%u] regcomp: %s", __FUNCTION__, __LINE__, __msg); \
+ } \
+ while (0)
+
#define LOG_ERROR_OPENSSL \
do \
{ \