Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime option to disable sherpa logs #983

Closed
manickavela29 opened this issue Jun 7, 2024 · 2 comments
Closed

Runtime option to disable sherpa logs #983

manickavela29 opened this issue Jun 7, 2024 · 2 comments

Comments

@manickavela29
Copy link
Contributor

manickavela29 commented Jun 7, 2024

Currently sherpa logs are controlled at 2 levels

  1. Build time with SHERPA_ONNX_ENABLE_CHECK option
  2. 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

@manickavela29
Copy link
Contributor Author

manickavela29 commented Jun 8, 2024

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

@csukuangfj
Copy link
Collaborator

We are switching to

#define SHERPA_ONNX_LOGE(...) \

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(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants