Files
FTL/patch/civetweb/0001-Log-debug-messages-to-webserver.log-when-debug.webse.patch
2025-09-03 20:00:47 +02:00

18 lines
646 B
Diff

diff --git a/src/webserver/civetweb/civetweb.c b/src/webserver/civetweb/civetweb.c
index 3df8eab9..9b0c6308 100644
--- a/src/webserver/civetweb/civetweb.c
+++ b/src/webserver/civetweb/civetweb.c
@@ -239,9 +239,10 @@ static void DEBUG_TRACE_FUNC(const char *func,
#endif
#else
+#include "log.h"
#define DEBUG_TRACE(fmt, ...) \
- do { \
- } while (0)
+ if(debug_flags[DEBUG_WEBSERVER]) {\
+ log_web("DEBUG: " fmt " (%s:%d)", ##__VA_ARGS__, short_path(__FILE__), __LINE__); }
#endif /* DEBUG */
#endif /* DEBUG_TRACE */