diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2020-07-07 14:43:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 14:43:32 +0200 |
commit | db707e0829d29f7aed6d2a5848706600ca8ff971 (patch) | |
tree | 18028e1c8eba670d61304ae13a49835bc48ce139 /example/reader_util.h | |
parent | 540326f3ffcc3126a1db3811464046ac7e061157 (diff) | |
parent | 030f3f3d48184133a6647108c156787fb3f39b58 (diff) |
Merge pull request #932 from IvanNardi/log
Log
Diffstat (limited to 'example/reader_util.h')
-rw-r--r-- | example/reader_util.h | 10 |
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 |