agent_logic.utils
Utilities module for the logic package.
This package contains utility functions and helpers used throughout the logic package. It includes: - logger: Standardized logging configuration and utility functions - Other utility modules may be added in the future
- agent_logic.utils.get_logger(name, level=None)[source]
Get a configured logger instance.
Creates or retrieves a logger with the given name and configures it with appropriate formatting and log level.
- Parameters:
name (
str) – Name of the logger (typically module name)level (
Optional[int]) – Logging level (if None, uses INFO)
- Return type:
Logger- Returns:
Configured logger instance ready for use
- agent_logic.utils.set_global_log_level(level)[source]
Set the log level for all loggers in the logic package.
This function affects all existing loggers in the logic namespace and sets their level to the specified value.
- Parameters:
level (
int) – Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) Example: logging.DEBUG or logging.ERROR- Return type:
None
Example
>>> from logic.utils.logger import set_global_log_level >>> import logging >>> set_global_log_level(logging.DEBUG) # Enable debug logging
Modules
Logging utilities for the logic package. |