We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c6b42e commit a618b86Copy full SHA for a618b86
runusb/__main__.py
@@ -330,6 +330,9 @@ def _setup_logging(self, log_dir: str) -> None:
330
os.path.join(log_dir, LOG_NAME),
331
mode='w', # Overwrite the log file
332
)
333
+ # Write through to avoid buffering the log file since the USB might be
334
+ # removed at any time
335
+ self.handler.stream.reconfigure(write_through=True)
336
REL_TIME_FILTER.reset_time_reference() # type: ignore[union-attr]
337
self.handler.setFormatter(TieredFormatter(
338
fmt='[%(reltime)08.3f - %(levelname)s] %(message)s',
0 commit comments