18 lines
458 B
Python
18 lines
458 B
Python
import logging
|
|
|
|
from control_backend.core.agent_system import BaseAgent as CoreBaseAgent
|
|
|
|
|
|
class BaseAgent(CoreBaseAgent):
|
|
"""
|
|
Base agent class for our agents to inherit from.
|
|
"""
|
|
|
|
logger: logging.Logger
|
|
|
|
# Whenever a subclass is initiated, give it the correct logger
|
|
def __init_subclass__(cls, **kwargs) -> None:
|
|
super().__init_subclass__(**kwargs)
|
|
|
|
cls.logger = logging.getLogger(__package__).getChild(cls.__name__)
|