-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
expose api to let user control log output #1060
Conversation
Note: I also considered making a log macro that included the |
e4dfbd6
to
a47d489
Compare
Add whisper_set_log_callback() that lets user set a callback for log messages. Change all the fprintf(stderr, ...) to call via the above.
OK, I applied your suggestions and rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, sorry for delay
* expose api to let user control log output Add whisper_set_log_callback() that lets user set a callback for log messages. Change all the fprintf(stderr, ...) to call via the above. * whisper : add <cstdarg> --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
* expose api to let user control log output Add whisper_set_log_callback() that lets user set a callback for log messages. Change all the fprintf(stderr, ...) to call via the above. * whisper : add <cstdarg> --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
* expose api to let user control log output Add whisper_set_log_callback() that lets user set a callback for log messages. Change all the fprintf(stderr, ...) to call via the above. * whisper : add <cstdarg> --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
* expose api to let user control log output Add whisper_set_log_callback() that lets user set a callback for log messages. Change all the fprintf(stderr, ...) to call via the above. * whisper : add <cstdarg> --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Add
whisper_set_log_callback()
that lets user set a callback for log messages.
Change all the
fprintf(stderr, ...)
to call via the above.
This is nice when embedding whisper.cpp into a larger program that doesn't want to print stuff to stderr.