Runtime option to disable sherpa logs
manickavela29 opened this issue · comments
Currently sherpa logs are controlled at 2 levels
- Build time with SHERPA_ONNX_ENABLE_CHECK option
- Runtime with SHERPA_ONNX_LOG_LEVEL env variable
But there is no control at runtime logs to disable,
will be handy in controlling at runtime.
will send a PR for this, let me know your thoughts
cc: @csukuangfj , @pkufool
Also adding SHERPA_ONNX_ENABLE_CHECK flag as part of the build tests might be necessary,
so that code bugs such as this #870 isn't missed.
I know that it is necessary for all the builds, but I have only tested for linux,
if its good I will send a PR changing all the workflows or it can just be related to linux builds
We are switching to
sherpa-onnx/sherpa-onnx/csrc/macros.h
Line 11 in fc09227
https://github.com/k2-fsa/sherpa-onnx/blob/master/sherpa-onnx/csrc/log.h
is intended to be removed.
If you want to disable all logs, just use
#define SHERPA_ONNX_LOGE(...)