cement.core.log

Cement core log module.

class cement.core.log.LogHandler(**kw)[source]

Bases: cement.core.log.LogInterface, cement.core.handler.Handler

Log handler implementation.

class cement.core.log.LogInterface(**kw)[source]

Bases: cement.core.interface.Interface

This class defines the Log Interface. Handlers that implement this interface must provide the methods and attributes defined below. In general, most implementations should sub-class from the provided LogHandler base class as a starting point.

class Meta[source]

Bases: object

Handler meta-data.

interface = 'log'

The string identifier of the interface.

debug(msg)[source]

Log to the DEBUG facility.

Parameters:msg (str) – The message to log.
error(msg)[source]

Log to the ERROR facility.

Parameters:msg (str) – The message to log.
fatal(msg)[source]

Log to the FATAL facility.

Parameters:msg (str) – The message to log.
get_level()[source]

Return a string representation of the log level.

info(msg)[source]

Log to the INFO facility.

Parameters:msg (str) – The message to log.
set_level()[source]
Set the log level. Must except atleast one of:
['INFO', 'WARNING', 'ERROR', 'DEBUG', or 'FATAL'].
warning(msg)[source]

Log to the WARNING facility.

Parameters:msg (str) – The message to log.