API Documentation¶
python logging extensions
This module contains the basic logging extensions.
-
class
logpp.logging.LogppHandler(level=0)[source]¶ Bases:
logging.Handler,abc.ABCExtend this class to create handlers specific to
LogppMessagemessages.-
emit(record: logging.LogRecord)[source]¶ This is the standard logging handler method that will filter out any messages that aren’t
LogppMessageinstances. When you extend this type of handler, override theLogppHandler.emit_logpp()method.- Parameters
record – the logging record
-
emit_logpp(msg_: logpp.logging.LogppMessage)[source]¶ Override this method to handle
LogppMessagemessages when they are logged.- Parameters
msg – the logpp logging message
-
-
class
logpp.logging.LogppMessage[source]¶ Bases:
tupleThis is a logging record, suitable to pass on to a logger as the primary logging message.
-
detail¶ the message detail object
-
summary¶ the message summary
-
-
class
logpp.logging.LogppMixin[source]¶ Bases:
objectThis is a mixin that provides standard access to a logger via the
LogppMixin.logger()function.The name of the logger reflect’s the class name, though you can override that by providing your class with a __loggername__ attribute.