ggerganov / whisper.cpp

Port of OpenAI's Whisper model in C/C++
MIT License
35.38k stars 3.61k forks source link

Disabling WHISPER_LOG_INFO #2111

Closed pprobst closed 6 months ago

pprobst commented 6 months ago

Hello.

As far as I know, there's no option to disable the logging done with WHISPER_LOG_INFO, present in whisper.cpp. This is a bit troublesome when debugging, as I need to comment all the WHISPER_LOG_INFO.

Is there an option to (cleanly) disable logging that I'm not aware of? If there is not, is it possible to request this feature? Thanks.

bobqianic commented 6 months ago

https://github.com/ggerganov/whisper.cpp/blob/8fac6455ffeb0a0950a84e790ddb74f7290d33c4/whisper.cpp#L131-L140

How about doing something similar to how we disable WHISPER_LOG_DEBUG?

 #if defined(WHISPER_LOG) 
 #define WHISPER_LOG_INFO(...)  whisper_log_internal(GGML_LOG_LEVEL_INFO , __VA_ARGS__) 
 #else 
 #define WHISPER_LOG_INFO(...) 
 #endif 
pprobst commented 6 months ago

True. I did not notice that. It can be done. Thanks.