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

Switch logging to utilize a custom logger #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fujimotos
Copy link

This is a small patch that improves Nue's logging system.

  • Make sure that log messages are sent through Nue's own logger,
    instead of using the root logger directly.

  • With this applied, we can suppress Nue's logs/warnings very easily.

The following snippet shows how this commit can be used:

import logging
import nue_asr

logging.getLogger('nue_asr').setLevel(logging.ERROR)
model = nue_asr.load_model("rinna/nue-asr", device="cpu")
...

Make sure that log messages are sent through Nue's own logger,
instead of using the root logger directly.

With this patch applied, users now can suppress Nue's logging
easily. For example:

    import logging
    logging.getLogger('nue_asr').setLevel(logging.ERROR)

Signed-off-by: Fujimoto Seiji <fujimoto@ceptord.net>
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

Successfully merging this pull request may close these issues.

1 participant