HSL 2.0 framework Description of the framework

Public Member Functions |Static Public Attributes |List of all members
hsl20_4.hsl20_4.Logger Class Reference

Logging. More

..

## Public Member Functions
def | set_level (self, level)
| Sets the log level. More...
def | info (self, msg)
| Logs a message with level INFO. More...
def | error (self, msg)
| Log a message with level ERROR. More...
def | debug (self, msg)
| Log a message with level DEBUG. More...
def | warning (self, msg)
| Log a message with Level WARNING. More...
def | critical (self, msg)
| Log a message with level CRITICAL. More...
def | exception (self, comment)
| Log an exception with level ERROR. More...

## Static Public Attributes
int | DISABLE = 100
| Switch off messages
int | CRITICAL = 50
| Only critical messages
int | ERROR = 40
| At least log error messages
int | WARNING = 30
| Log at least a warning
int | INFO = 20
| At least record information
int | DEBUG = 10
| At least log debug messages
int | NOTSET = 0
| Python default setting for logger ( = WARNING)

## Detailed Description

Logging

Logs states on different levels

Note
  When using a logger, the tag `<logging>` must be specified in the XML definition file

## Member Function Documentation

## ◆ critical()

def hsl20_4.hsl20_4.logger.critical | ( |  | self,
|  |  | msg
| ) |  |

Log a message with level CRITICAL

Parameters

  msg | string Message

## ◆ debug()

def hsl20_4.hsl20_4.Logger.debug | ( |  | self,
|  |  | msg
| ) |  |

Logs a message with level DEBUG

Parameters

  msg | string Message

## ◆ error()

def hsl20_4.hsl20_4.Logger.error | ( |  | self,
|  |  | msg
| ) |  |

Log a message with level ERROR

Parameters

  msg | string Message

## ◆ exception()

def hsl20_4.hsl20_4.Logger.exception | ( |  | self,
|  |  | comment
| ) |  |

Log an exception with level ERROR

The message consists of the traceback of the exception and a comment

Parameters

  comment | string Comment

## ◆ info()

def hsl20_4.hsl20_4.Logger.info | ( |  | self,
|  |  | msg
| ) |  |

Logs a message with level INFO

Parameters

  msg | string Message

## ◆ set_level()

def hsl20_4.hsl20_4.logger.set_level | ( |  | self,
|  |  | level
| ) |  |

Sets the log level

All messages from the set level on are logged
Messages with a level lower than the set level are not output

Note
  If the level is set to NOTSET ( = 0), no messages are output!

Parameters

  level | int Level (see constants) To be on the safe side, one of the constants should always be specified here!

## ◆ warning()

def hsl20_4.hsl20_4.Logger.warning | ( |  | self,
|  |  | msg
| ) |  |

Log a message with Level WARNING

Parameters

  msg | string Message

The documentation for this class was generated from the following file:

- hsl20_4.py