File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,12 @@ def emit(self, record: LogRecord) -> None:
206206 """
207207 self .stream .write (self .format (record ) + self .terminator )
208208
209+ def flush (self ) -> None :
210+ """flush the stream. You might need to call this if your messages
211+ are not appearing in the log file.
212+ """
213+ self .stream .flush ()
214+
209215
210216class FileHandler (StreamHandler ):
211217 """File handler for working with log files off of the microcontroller (like
@@ -239,7 +245,6 @@ def emit(self, record: LogRecord) -> None:
239245 :param record: The record (message object) to be logged
240246 """
241247 self .stream .write (self .format (record ))
242- self .stream .flush ()
243248
244249
245250class RotatingFileHandler (FileHandler ):
@@ -339,7 +344,6 @@ def emit(self, record: LogRecord) -> None:
339344 ):
340345 self .doRollover ()
341346 self .stream .write (self .format (record ))
342- self .stream .flush ()
343347
344348
345349class NullHandler (Handler ):
You can’t perform that action at this time.
0 commit comments