client_base.py overwrites logging.basicConfig
lg900 opened this issue · 1 comments
lg900 commented
The following code does not produce a log:
import logging
from mistralai.client import MistralClient
logger = logging.getLogger( __name__ )
logger.info( "Hello world" )
This is because of these lines in client_base.py:
logging.basicConfig(
format="%(asctime)s %(levelname)s %(name)s: %(message)s",
level=os.getenv("LOG_LEVEL", "ERROR"),
)
Modules should not setup the logging configuration, this should be removed or refactored so it is only called for __ main __ for example.