Skip to content

Commit 44a366a

Browse files
committed
Initial draft of the pytest (thanks copilot)
1 parent 29aeed6 commit 44a366a

2 files changed

Lines changed: 696 additions & 3 deletions

File tree

src/daqpytools/logging/handlers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,21 +477,21 @@ def _throttle(self, rec: IssueRecord, record: logging.LogRecord) -> bool:
477477
if rec.suppressed_counter >= rec.threshold:
478478
rec.threshold = rec.threshold * 10 # Escalate: 10 -> 100 -> 1000 ...
479479
rec.last_occurrence = current_time
480-
rec. last_occurrence_formatted = self._format_timestamp(current_time)
480+
rec.last_occurrence_formatted = self._format_timestamp(current_time)
481481
self._report_suppression(rec, record)
482482
return False # Don't emit the original record
483483

484484
# Step 4: Check if enough time passed since last report
485485
if current_time - rec.last_report > self.time_limit:
486486
rec.last_occurrence = current_time
487-
rec. last_occurrence_formatted = self._format_timestamp(current_time)
487+
rec.last_occurrence_formatted = self._format_timestamp(current_time)
488488
self._report_suppression(rec, record)
489489
return False # Don't emit the original record
490490

491491
# Step 5: Suppress silently
492492
rec.suppressed_counter += 1
493493
rec.last_occurrence = current_time
494-
rec. last_occurrence_formatted = self._format_timestamp(current_time)
494+
rec.last_occurrence_formatted = self._format_timestamp(current_time)
495495
return False
496496

497497
def _report_suppression(self, rec: IssueRecord, record: logging.LogRecord) -> None:

0 commit comments

Comments
 (0)