diff options
Diffstat (limited to 'example/reader_util.h')
-rw-r--r-- | example/reader_util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/example/reader_util.h b/example/reader_util.h index 8298e2ef8..facce0114 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -336,4 +336,15 @@ float ndpi_flow_get_byte_count_entropy(const uint32_t byte_count[256], unsigned extern int nDPI_LogLevel; +/* TODO: conditional compilation? */ +#if 1 + #define LOG(log_level, args...) \ + { \ + if(log_level <= nDPI_LogLevel) \ + printf(args); \ + } +#else + #define LOG(...) {} +#endif + #endif |