@@ -41,22 +41,7 @@ def __init__(self, env_file_path: str | None = None, **data):
4141 logging_level = getattr (
4242 logging , self .application_context .configuration .app_logging_level , logging .INFO
4343 )
44- # Configure basic logging with format
45- logging .basicConfig (
46- level = logging_level ,
47- format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' ,
48- force = True # This ensures the configuration is applied
49- )
50-
51- package_level_str = self .application_context .configuration .azure_package_logging_level
52- package_level = getattr (logging , package_level_str , logging .WARNING )
53- packages = self .application_context .configuration .azure_logging_packages
54- azure_logging_packages = packages .split ("," ) if packages else []
55-
56- # Package config: Azure loggers set to WARNING to suppress INFO
57- for logger_name in azure_logging_packages :
58- logging .getLogger (logger_name ).setLevel (package_level )
59- logging .info (f"Logging configured - Basic: { self .application_context .configuration .app_logging_level } , Azure packages: { package_level_str } , Packages: { azure_logging_packages } " )
44+ logging .basicConfig (level = logging_level )
6045
6146 def _load_env (self , env_file_path : str | None = None ):
6247 # if .env file path is provided, load it
@@ -72,4 +57,4 @@ def _load_env(self, env_file_path: str | None = None):
7257 return env_file_path
7358
7459 def _get_derived_class_location (self ):
75- return inspect .getfile (self .__class__ )
60+ return inspect .getfile (self .__class__ )
0 commit comments