Skip to content

Commit

Permalink
Merge branch 'feature/flush-logs' into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
WillB97 committed Jul 10, 2024
2 parents e05987f + 0b6c460 commit 8bb518a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runusb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ def _setup_logging(self, log_dir: str) -> None:
os.path.join(log_dir, LOG_NAME),
mode='w', # Overwrite the log file
)
# Write through to avoid buffering the log file since the USB might be
# removed at any time
self.handler.stream.reconfigure(write_through=True)
REL_TIME_FILTER.reset_time_reference() # type: ignore[union-attr]
self.handler.setFormatter(TieredFormatter(
fmt='[%(reltime)08.3f - %(levelname)s] %(message)s',
Expand Down

0 comments on commit 8bb518a

Please sign in to comment.