MCPcopy Create free account
hub / github.com/InternScience/InternAgent / setup_logging

Function setup_logging

launch_discovery.py:321–336  ·  view source on GitHub ↗

Setup logging configuration

()

Source from the content-addressed store, hash-verified

319# Logging Configuration
320# ============================================================================
321def setup_logging():
322 """Setup logging configuration"""
323 log_dir = 'logs'
324 os.makedirs(log_dir, exist_ok=True)
325 log_file = osp.join(log_dir, f'{datetime.now().strftime("%Y%m%d_%H%M%S")}_internagent.log')
326
327 logging.basicConfig(
328 level=logging.INFO,
329 format='%(asctime)s - %(name)s - %(levelname)s - %(filename)s:%(lineno)d - %(message)s',
330 handlers=[
331 logging.StreamHandler(),
332 logging.FileHandler(log_file)
333 ]
334 )
335 logging.getLogger("httpx").setLevel(logging.WARNING)
336 return logging.getLogger("InternAgent")
337
338
339# ============================================================================

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected