← Back to team overview

launchpad-dev team mailing list archive

QuietFakeLogger is dead, long live BufferLogger

 

Hi All,

After messing around with some loggers in tests I thought now was a good time 
to unify.

OMG... what a job.

QuietFakeLogger and BufferLogger were almost identical, so I have deleted 
QuietFakeLogger and renamed all uses to use BufferLogger.

I have also moved the loggers to lp.services.log.logger.

During the hunt I found some FakeLoggers where the message method was being 
overridden to do nothing.  This was occurring in multiple places, so the 
DevNullLogger was born.

This may take a day or two to land due to people's use, and changes clashing, 
and me fixing test fallout from minor layout changes.

The MockLogger is also being removed in this branch.  All *FOUR* of them.

FakeLogger writes to stdout, and I have a mind to rename this and change the 
base class.

BufferLogger records the content in a StringIO object.

DevNullLogger discards all log messages.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow ups