MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / __init__

Method __init__

nmap_logger.py:17–25  ·  view source on GitHub ↗
(self, log_file: str = None)

Source from the content-addressed store, hash-verified

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"""

Callers

nothing calls this directly

Calls 2

_ensure_log_directoryMethod · 0.95
_setup_loggerMethod · 0.95

Tested by

no test coverage detected