cement.core.log

Cement core log module.

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

Bases: LogInterface, Handler

Log handler implementation.

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

Bases: 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.

abstract debug(msg)[source]

Log to the DEBUG facility.

Parameters:

msg (str) – The message to log.

abstract error(msg)[source]

Log to the ERROR facility.

Parameters:

msg (str) – The message to log.

abstract fatal(msg)[source]

Log to the FATAL facility.

Parameters:

msg (str) – The message to log.

abstract get_level()[source]

Return a string representation of the log level.

abstract info(msg)[source]

Log to the INFO facility.

Parameters:

msg (str) – The message to log.

abstract set_level()[source]
Set the log level. Must except atleast one of:

['INFO', 'WARNING', 'ERROR', 'DEBUG', or 'FATAL'].

abstract warning(msg)[source]

Log to the WARNING facility.

Parameters:

msg (str) – The message to log.