MCPcopy Create free account
hub / github.com/Riley702/enhanced_benchmark_tool / initialize_logging

Function initialize_logging

src/__init__.py:64–83  ·  view source on GitHub ↗

Configures logging for the package. Args: log_level (int): Logging level (default: logging.INFO). log_file (str): Path to the log file (default: 'benchmark_tool.log'). Returns: None

(log_level=logging.INFO, log_file="benchmark_tool.log")

Source from the content-addressed store, hash-verified

62
63
64def initialize_logging(log_level=logging.INFO, log_file="benchmark_tool.log"):
65 """
66 Configures logging for the package.
67
68 Args:
69 log_level (int): Logging level (default: logging.INFO).
70 log_file (str): Path to the log file (default: 'benchmark_tool.log').
71
72 Returns:
73 None
74 """
75 logging.basicConfig(
76 level=log_level,
77 format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
78 handlers=[
79 logging.FileHandler(log_file),
80 logging.StreamHandler()
81 ],
82 )
83 logging.info("Logging initialized.")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected