aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.h
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2020-07-07 14:43:32 +0200
committerGitHub <noreply@github.com>2020-07-07 14:43:32 +0200
commitdb707e0829d29f7aed6d2a5848706600ca8ff971 (patch)
tree18028e1c8eba670d61304ae13a49835bc48ce139 /example/reader_util.h
parent540326f3ffcc3126a1db3811464046ac7e061157 (diff)
parent030f3f3d48184133a6647108c156787fb3f39b58 (diff)
Merge pull request #932 from IvanNardi/log
Log
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