|
webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
| def | __init__ (self, capacity) |
| def | shouldFlush (self, record) |
| def | emit (self, record) |
| def | flush (self) |
Public Attributes | |
| capacity | |
| buffer | |
A handler class which buffers logging records in memory. Whenever each record is added to the buffer, a check is made to see if the buffer should be flushed. If it should, then flush() is expected to do what's needed.
| def compat_logging.handlers.BufferingHandler.__init__ | ( | self, | |
| capacity | |||
| ) |
Initialize the handler with the buffer size.
| def compat_logging.handlers.BufferingHandler.emit | ( | self, | |
| record | |||
| ) |
Emit a record. Append the record. If shouldFlush() tells us to, call flush() to process the buffer.
| def compat_logging.handlers.BufferingHandler.flush | ( | self | ) |
Override to implement custom flushing behaviour. This version just zaps the buffer to empty.
| def compat_logging.handlers.BufferingHandler.shouldFlush | ( | self, | |
| record | |||
| ) |
Should the handler flush its buffer? Returns true if the buffer is up to capacity. This method can be overridden to implement custom flushing strategies.
| compat_logging.handlers.BufferingHandler.buffer |
| compat_logging.handlers.BufferingHandler.capacity |
1.8.13