66and compliance validation.
77"""
88
9- import logging
109import os
11- from typing import List , Literal , Optional
10+ from typing import List , Optional
1211
13- from pydantic import BaseModel , Field , field_validator , model_validator
12+ from pydantic import BaseModel , Field , model_validator
1413from pydantic_settings import BaseSettings , SettingsConfigDict
1514from typing_extensions import Self
1615
@@ -26,32 +25,6 @@ def parse_comma_separated(value: str) -> List[str]:
2625 return []
2726
2827
29- class _LoggingSettings (BaseSettings ):
30- """Logging configuration settings."""
31- model_config = SettingsConfigDict (
32- env_prefix = "AZURE_" , env_file = DOTENV_PATH , extra = "ignore" , env_ignore_empty = True
33- )
34-
35- basic_logging_level : Literal ["DEBUG" , "INFO" , "WARNING" , "ERROR" ] = "INFO"
36- package_logging_level : Literal ["DEBUG" , "INFO" , "WARNING" , "ERROR" ] = "WARNING"
37- logging_packages : Optional [List [str ]] = []
38-
39- @field_validator ("logging_packages" , mode = "before" )
40- @classmethod
41- def split_logging_packages (cls , packages ) -> Optional [List [str ]]:
42- if isinstance (packages , str ) and len (packages .strip ()) > 0 :
43- return [pkg .strip () for pkg in packages .split ("," ) if pkg .strip ()]
44- return None
45-
46- def get_basic_log_level (self ) -> int :
47- """Convert string log level to logging constant."""
48- return getattr (logging , self .basic_logging_level .upper ())
49-
50- def get_package_log_level (self ) -> int :
51- """Convert string package log level to logging constant."""
52- return getattr (logging , self .package_logging_level .upper ())
53-
54-
5528class _UiSettings (BaseSettings ):
5629 """UI configuration settings."""
5730 model_config = SettingsConfigDict (
@@ -463,7 +436,6 @@ class _AppSettings(BaseModel):
463436 azure_openai : _AzureOpenAISettings = _AzureOpenAISettings ()
464437 ai_foundry : _AIFoundrySettings = _AIFoundrySettings ()
465438 brand_guidelines : _BrandGuidelinesSettings = _BrandGuidelinesSettings ()
466- logging : _LoggingSettings = _LoggingSettings ()
467439 ui : Optional [_UiSettings ] = _UiSettings ()
468440
469441 # Constructed properties
0 commit comments