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

Configuration option to disable logs in production #1009

Closed
shihgianlee opened this issue Aug 21, 2020 · 4 comments
Closed

Configuration option to disable logs in production #1009

shihgianlee opened this issue Aug 21, 2020 · 4 comments
Assignees
Labels
feature Feature requests or pull request implementing a new feature
Projects

Comments

@shihgianlee
Copy link

Is your feature request related to a problem? Please describe.
We have a mechanism to capture logs in production that doesn't require log files collection. However, there is no option to disable local log files generation.

Describe the solution you'd like
A configuration option for user to disable logging to files.

Describe alternatives you've considered
Accept the default behavior since log rotation is in place. There is no concerns that the log files will grow large and eat up disk space on the server.

@yubozhao yubozhao added feature Feature requests or pull request implementing a new feature good-first-issue Good for newcomers help-wanted An issue currently lacks a contributor labels Aug 22, 2020
@stale
Copy link

stale bot commented Nov 22, 2020

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.

@stale stale bot added the stale label Nov 22, 2020
@parano
Copy link
Member

parano commented Nov 24, 2020

cc @bojiang as discussed - add the following CLI arg to bentoml API server: --enable-log-to-file / BENTOML_ENABLE_LOG_TO_FILE=True, default to true.

@stale stale bot removed the stale label Nov 24, 2020
@parano parano added this to Next major release in Roadmap via automation Nov 26, 2020
@parano parano removed good-first-issue Good for newcomers help-wanted An issue currently lacks a contributor labels Nov 26, 2020
@ssheng
Copy link
Collaborator

ssheng commented Dec 24, 2020

I'm going take a stab at this problem next. Discussed offline with @yubozhao, we think the best option might to be generically expose the full logging configuration rather than just the log-to-file option, so we can hopefully solve all logging customization needs.

My plan is to expose the logging configuration through CLI param and environment variable in that priority order while maintaining a reasonable default like the one in log.py. Docker and K8s can hopefully leverage it without much change.

Please let me know your thoughts.

ssheng added a commit to ssheng/BentoML that referenced this issue Dec 26, 2020
ssheng added a commit to ssheng/BentoML that referenced this issue Dec 29, 2020
ssheng added a commit to ssheng/BentoML that referenced this issue Dec 29, 2020
parano pushed a commit that referenced this issue Jan 6, 2021
#1365)

* [Enhancement] Allow full logging customization through YAML configuration (#1009)

* Add yaml to install_requires in setup.py

* Use ruamel.yaml instead of yaml for parsing logging configuration and remove local file handlers for prediction and feedback loggers

* Address linter errors and update documentation.

* Addressed pull request comments.
  - Added configuration for disabling console and file logging
  - Added unit test for log.py
  - Added documentation for configuration in general
  - Updated documentation for logging

* Added debug logging to specify where logging configuration was loaded from.

* Fix unit test file permission issue on Windows.

* Update documentation log file examples.
@yubozhao
Copy link
Contributor

yubozhao commented Jan 7, 2021

Thank you @ssheng for working on this issue. I think this is a great addition to the community.

@shihgianlee This feature will be part of the next release. Feel free to reopen this issue, if you have additional questions.

@yubozhao yubozhao closed this as completed Jan 7, 2021
Roadmap automation moved this from Next to Done Jan 7, 2021
uhbuhb pushed a commit to MLH-Fellowship/BentoML that referenced this issue Feb 17, 2021
bentoml#1365)

* [Enhancement] Allow full logging customization through YAML configuration (bentoml#1009)

* Add yaml to install_requires in setup.py

* Use ruamel.yaml instead of yaml for parsing logging configuration and remove local file handlers for prediction and feedback loggers

* Address linter errors and update documentation.

* Addressed pull request comments.
  - Added configuration for disabling console and file logging
  - Added unit test for log.py
  - Added documentation for configuration in general
  - Updated documentation for logging

* Added debug logging to specify where logging configuration was loaded from.

* Fix unit test file permission issue on Windows.

* Update documentation log file examples.
aarnphm pushed a commit to aarnphm/BentoML that referenced this issue Jul 29, 2022
bentoml#1365)

* [Enhancement] Allow full logging customization through YAML configuration (bentoml#1009)

* Add yaml to install_requires in setup.py

* Use ruamel.yaml instead of yaml for parsing logging configuration and remove local file handlers for prediction and feedback loggers

* Address linter errors and update documentation.

* Addressed pull request comments.
  - Added configuration for disabling console and file logging
  - Added unit test for log.py
  - Added documentation for configuration in general
  - Updated documentation for logging

* Added debug logging to specify where logging configuration was loaded from.

* Fix unit test file permission issue on Windows.

* Update documentation log file examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests or pull request implementing a new feature
Projects
No open projects
Development

No branches or pull requests

5 participants