Skip to content

Commit

Permalink
Merge pull request #65 from PCPartPicker/main
Browse files Browse the repository at this point in the history
Fix log files not containing any newlines ever
  • Loading branch information
FoamyGuy authored Oct 2, 2024
2 parents cf88c44 + bbef817 commit af7b881
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions adafruit_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def emit(self, record: LogRecord) -> None:
:param record: The record (message object) to be logged
"""
self.stream.write(self.format(record))
super().emit(record)
self.stream.flush()


Expand Down Expand Up @@ -431,8 +431,7 @@ def emit(self, record: LogRecord) -> None:
and (self._backupCount > 0)
):
self.doRollover()
self.stream.write(self.format(record))
self.stream.flush()
super().emit(record)


class NullHandler(Handler):
Expand Down

0 comments on commit af7b881

Please sign in to comment.