Normalize logging hierarchy (#294)

This commit is contained in:
Dillon DuPont
2025-06-20 10:20:44 -04:00
parent 910e8bc937
commit 531fb7ccaf
18 changed files with 27 additions and 46 deletions

View File

@@ -6,7 +6,7 @@ import logging
__version__ = "0.1.0"
# Initialize logging
logger = logging.getLogger("cua.agent")
logger = logging.getLogger("agent")
# Initialize telemetry when the package is imported
try:

View File

@@ -11,10 +11,8 @@ from .types import AgentResponse
from .factory import LoopFactory
from .provider_config import DEFAULT_MODELS, ENV_VARS
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class ComputerAgent:
"""A computer agent that can perform automated tasks using natural language instructions."""

View File

@@ -34,7 +34,7 @@ flush = _default_flush
is_telemetry_enabled = _default_is_telemetry_enabled
is_telemetry_globally_disabled = _default_is_telemetry_globally_disabled
logger = logging.getLogger("cua.agent.telemetry")
logger = logging.getLogger("agent.telemetry")
try:
# Import from core telemetry

View File

@@ -26,10 +26,8 @@ from .api_handler import OmniAPIHandler
from .tools.manager import ToolManager
from .tools import ToolResult
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def extract_data(input_string: str, data_type: str) -> str:
"""Extract content from code blocks."""
pattern = f"```{data_type}" + r"(.*?)(```|$)"

View File

@@ -25,10 +25,8 @@ from .prompts import COMPUTER_USE, SYSTEM_PROMPT, MAC_SPECIFIC_NOTES
from .clients.oaicompat import OAICompatClient
from .clients.mlxvlm import MLXVLMUITarsClient
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class UITARSLoop(BaseLoop):
"""UI-TARS-specific implementation of the agent loop.