mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
- Remove all unconditional pytest.skip() calls - Fix file content tests to handle both strict/non-strict modes - Fix missing device_capabilities module in hanzo-network - Fix HanzoNetProvider imports and exports - Fix local_llm.py import errors - Create test helper classes for pagination tests - Fix FastMCP paginator test constructor args - Configure all API keys from ~/.zsh/after.zsh - All tests now pass or skip conditionally based on actual requirements
29 lines
788 B
Python
29 lines
788 B
Python
import logging
|
|
import os
|
|
|
|
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
|
|
|
|
DEBUG = os.getenv("DEBUG", "False").lower() in ["true", "1", "yes"]
|
|
if DEBUG:
|
|
LOG_LEVEL = "DEBUG"
|
|
|
|
oh_aci_logger = logging.getLogger("dev_aci")
|
|
|
|
current_log_level = logging.INFO
|
|
if LOG_LEVEL in logging.getLevelNamesMapping():
|
|
current_log_level = logging.getLevelNamesMapping()[LOG_LEVEL]
|
|
|
|
console_handler = logging.StreamHandler()
|
|
console_handler.setLevel(current_log_level)
|
|
formatter = logging.Formatter(
|
|
"{asctime} - {name}:{levelname} - {message}",
|
|
style="{",
|
|
datefmt="%Y-%m-%d %H:%M",
|
|
)
|
|
console_handler.setFormatter(formatter)
|
|
|
|
oh_aci_logger.setLevel(current_log_level)
|
|
oh_aci_logger.addHandler(console_handler)
|
|
oh_aci_logger.propagate = False
|
|
oh_aci_logger.debug("Logger initialized")
|