Table of Contents

Class: IBasicLogger ./src/peak/running/logs.py

A PEP 282 "logger" object, minus configuration methods

All methods that take msg and positional arguments args will interpolate args into msg, so the format is a little like a printf in C. For example, in this code:

aLogger.debug("color=%s; number=%d", "blue", 42)

the log message will be rendered as "color=blue; number=42". Loggers should not interpolate the message until they have verified that the message will not be trivially suppressed. (For example, if the logger is not accepting messages of the designated priority level.) This avoids needless string processing in code that does a lot of logging calls that are mostly suppressed. (E.g. debug logging.)

Methods that take a **kwargs keywords argument only accept an exc_info flag as a keyword argument. If exc_info is a true value, exception data from sys.exc_info() is added to the log message.

Base Classes   
protocols.Interface
Methods   
critical
debug
error
exception
getEffectiveLevel
info
isEnabledFor
log
warning
  critical 
critical (
        msg,
        *args,
        *kwargs,
        )

Log msg w/level CRITICAL

  debug 
debug (
        msg,
        *args,
        *kwargs,
        )

Log msg w/level DEBUG

  error 
error (
        msg,
        *args,
        *kwargs,
        )

Log msg w/level ERROR

  exception 
exception ( msg,  *args )

Log msg w/level ERROR, add exception info

  getEffectiveLevel 
getEffectiveLevel ()

Get minimum priority level required for messages to be accepted

  info 
info (
        msg,
        *args,
        *kwargs,
        )

Log msg w/level INFO

  isEnabledFor 
isEnabledFor ( lvl )

Return true if logger will accept messages of level lvl

  log 
log (
        lvl,
        msg,
        *args,
        *kwargs,
        )

Log msg w/level lvl

  warning 
warning (
        msg,
        *args,
        *kwargs,
        )

Log msg w/level WARNING


Table of Contents

This document was automatically generated on Mon Apr 22 01:11:03 2024 by HappyDoc version 2.1