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")
| 62 | |
| 63 | |
| 64 | def 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.") |
nothing calls this directly
no outgoing calls
no test coverage detected