(self, log_file: str = None)
| 15 | """ |
| 16 | |
| 17 | def __init__(self, log_file: str = None): |
| 18 | # Default to data/logs/nmap.log in the project directory |
| 19 | if log_file is None: |
| 20 | project_root = os.path.dirname(os.path.abspath(__file__)) |
| 21 | log_file = os.path.join(project_root, 'data', 'logs', 'nmap.log') |
| 22 | self.log_file = log_file |
| 23 | self.lock = threading.Lock() |
| 24 | self._ensure_log_directory() |
| 25 | self._setup_logger() |
| 26 | |
| 27 | def _ensure_log_directory(self): |
| 28 | """Ensure the log directory exists""" |
nothing calls this directly
no test coverage detected