aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'example/reader_util.h')
-rw-r--r--example/reader_util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/example/reader_util.h b/example/reader_util.h
index c94998496..75d66bfd4 100644
--- a/example/reader_util.h
+++ b/example/reader_util.h
@@ -336,4 +336,14 @@ float ndpi_flow_get_byte_count_entropy(const uint32_t byte_count[256], unsigned
extern int nDPI_LogLevel;
+#ifdef NDPI_ENABLE_DEBUG_MESSAGES
+ #define LOG(log_level, args...) \
+ { \
+ if(log_level <= nDPI_LogLevel) \
+ printf(args); \
+ }
+#else
+ #define LOG(...) {}
+#endif
+
#endif