AgentLogger
This class provides a configurable logging utility specifically for agent operations. It allows for setting log levels, directing output to both the console and an optional file, and can optionally configure the root logger. The class also suppresses verbose logging from specific libraries like httpx and internal litellm components to maintain cleaner output.
Attributes
- logger: logging.Logger = logging.getLogger(name)
- The logger instance for agent operations.
 
Constructors
- 
Logger class for agent operations. 
- 
Parameters - name: string
- The name of the logger.
 
- level: Union[int, str, None]
- The logging level (e.g., 'INFO', 'DEBUG', or an integer value).
 
- log_file: Optional[Path]
- An optional path to a log file.
 
- configure_root: bool
- Whether to configure the root logger.
 
 
- name: string
Methods
def debug(msg: string) - > None
- 
Log debug message. 
- 
Parameters - msg: string
- The debug message to log.
 
 
- msg: string
- 
Return Value: None 
def info(msg: string) - > None
- 
Log info message. 
- 
Parameters - msg: string
- The info message to log.
 
 
- msg: string
- 
Return Value: None 
def warning(msg: string) - > None
- 
Log warning message. 
- 
Parameters - msg: string
- The warning message to log.
 
 
- msg: string
- 
Return Value: None 
def error(msg: string) - > None
- 
Log error message. 
- 
Parameters - msg: string
- The error message to log.
 
 
- msg: string
- 
Return Value: None 
def critical(msg: string) - > None
- 
Log critical message. 
- 
Parameters - msg: string
- The critical message to log.
 
 
- msg: string
- 
Return Value: None