Python logging: Retrieving the last log record from a handler

Vinay Sajip vinay_sajip at
Tue Mar 4 12:02:22 CET 2008

On Mar 3, 11:41 am, Frank Aune <Frank.A... at> wrote:
> I will be fairly surprised if this functionality is not already built-in for
> the defaultlogginghandlers, but so far I've been unable to figure out how
> to pull it of without the custom loghandler above.

Prepare to be surprised ;-)

Except for the MemoryHandler, which is designed specifically as a
buffer for logging events, the handlers in the logging package do not
store the last record they processed. (Neither do loggers, filters or
formatters, all of which get to see records as they are processed.)

Best regards,

Vinay Sajip

More information about the Python-list mailing list