-
Notifications
You must be signed in to change notification settings - Fork 802
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
Guide on customizing prediction/feedback log logger config #1058
Comments
being able to manage the logging using the cli would be very helpful - we're running into a problem when we don't have write access to the local disk and it would be very handy to have all the loggers just have |
Hi @mikedewar - unfortunately, there isn't a way to configure that behavior in the current version of BentoML. This has been reported by quite a few users recently and it is being tracked here: #1009 It should be a fairly small code change and I will prioritize it for the next release. Thank you for reporting it! |
ah I should have dug a little deeper before commenting! I appreciate the prioritisation. 🙏 |
@mikedewar actually found a quick workaround for you without waiting for the next release. You can try adding the following line in your BentoService class definition file, after importing BentoML: import logging
bentoml_file_handler = next(handler for handler in logging.getLogger('bentoml').handlers if type(handler) is logging.handlers.RotatingFileHandler)
logging.getLogger('bentoml').removeHandler(bentoml_file_handler) We should be able to make this more easily configurable in the next release 🙏 |
@parano thanks for this. We're actually stuck where we're using the CLI tool e.g. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This has been added by @ssheng here: https://docs.bentoml.org/en/latest/guides/logging.html |
Is your feature request related to a problem? Please describe.
Currently, the bentoml logging config is mostly defined here: https://github.com/bentoml/BentoML/blob/v0.8.6/bentoml/utils/log.py
It is a good default logging config but users may want to further configure it. Especially around configuring the prediction and feedback logs.
Users can already do this via the Python logging library today. e.g.
We should add a guide on how best practices around customizing and managing the prediction logs, as well as ways a user can set up log collection sidecar, etc
The text was updated successfully, but these errors were encountered: