(self, file_path)
| 282 | |
| 283 | class JsonLogger: |
| 284 | def __init__(self, file_path): |
| 285 | # Extract PDF name for logger name |
| 286 | pdf_name = get_pdf_name(file_path) |
| 287 | |
| 288 | current_time = datetime.now().strftime("%Y%m%d_%H%M%S") |
| 289 | self.filename = f"{pdf_name}_{current_time}.json" |
| 290 | os.makedirs("./logs", exist_ok=True) |
| 291 | # Initialize empty list to store all messages |
| 292 | self.log_data = [] |
| 293 | |
| 294 | def log(self, level, message, **kwargs): |
| 295 | if isinstance(message, dict): |
nothing calls this directly
no test coverage detected