File tree 1 file changed +6
-2
lines changed 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:
206
206
"""
207
207
self .stream .write (self .format (record ) + self .terminator )
208
208
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
+
209
215
210
216
class FileHandler (StreamHandler ):
211
217
"""File handler for working with log files off of the microcontroller (like
@@ -239,7 +245,6 @@ def emit(self, record: LogRecord) -> None:
239
245
:param record: The record (message object) to be logged
240
246
"""
241
247
self .stream .write (self .format (record ))
242
- self .stream .flush ()
243
248
244
249
245
250
class RotatingFileHandler (FileHandler ):
@@ -339,7 +344,6 @@ def emit(self, record: LogRecord) -> None:
339
344
):
340
345
self .doRollover ()
341
346
self .stream .write (self .format (record ))
342
- self .stream .flush ()
343
347
344
348
345
349
class NullHandler (Handler ):
You can’t perform that action at this time.
0 commit comments