You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing an issue with the logging configuration not being applied when using the monitoringresource in a BentoML service. Despite specifying the logging configuration file in the log_config_file parameter, the loggers are not picking up the configurations as expected. The only way I can get the logging configuration to apply correctly is by manually loading the configuration file and setting up the loggers within the service initialization.
To reproduce
Provide a file with 2 services: 1 working, another not working. I expect them both to work:
issue_logging_service.py
When I do bentoml build and then bentoml serve --development --reload I expect to see this:
[2024-06-03 13:20:01,860] INFO - /predict endpoint started
WordClassifierModel
20
<RootLogger root (WARNING)>
Logger Handlers: [<StreamHandler <stdout> (INFO)>]
[2024-06-03 13:20:01,860] INFO - /predict endpoint finished
But I only see it if I explicitly load logging yaml file to dictionary. When I try to do it only with monitor resource I see no lines in the stream. That is SimpleLoggingServiceNotWorking does not output it to stream:
[2024-06-03 13:20:01,860] INFO - /predict endpoint started
[2024-06-03 13:20:01,860] INFO - /predict endpoint finished
Describe the bug
I am experiencing an issue with the logging configuration not being applied when using the
monitoring
resource in a BentoML service. Despite specifying the logging configuration file in the log_config_file parameter, the loggers are not picking up the configurations as expected. The only way I can get the logging configuration to apply correctly is by manually loading the configuration file and setting up the loggers within the service initialization.To reproduce
issue_logging_service.py
This is
configuration_log.yaml
:and finally bentofile.yaml:
Expected behavior
When I do
bentoml build
and thenbentoml serve --development --reload
I expect to see this:But I only see it if I explicitly load logging yaml file to dictionary. When I try to do it only with
monitor
resource I see no lines in the stream. That isSimpleLoggingServiceNotWorking
does not output it to stream:Environment
Environment variable
System information
bentoml
: 1.2.16python
: 3.10.14platform
: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35The text was updated successfully, but these errors were encountered: