ggerganov/ggwave-spm

Allow disabling logs by redefining ggprintf macro

petrdvorak opened this issue · 2 comments

Currently, the code in ggwave.cpp is always logging. Sometimes (especially in production builds), this could be undesired. It would be nice to disable logging, i.e., based on additional environment variable or in case DEBUG is not defined.

You can disable ggwave logging by calling the ggwave_setLogFile() function. Here is an example how to use it:

ggerganov/ggwave-objc@f64bae2

Thank you, I will have a look. The issue of this approach, though, is that logging is configured at runtime. With macro definition, the logging code is rmeoved at compile time.