Logger

Logger for Syslog

logger.debug(msg)[source]

Debug logging statement

Parameters:msg – the message to print
Returns:True – to allow it as an #assert statement
logger.error(msg)[source]

Error logging statement

Parameters:msg – the message to print
Returns:True – to allow it as an #assert statement
logger.info(msg)[source]

Informational logging statement

Parameters:msg – the message to print
Returns:True – to allow it as an #assert statement
logger.log(level, msg, logger)[source]

Do the actual logging at the specified level, but save it in case no logger exists yet

Parameters:
  • level – string representation of the function to call on the logger
  • msg – the message to log
Returns:

True – to allow it as an #assert statement

logger.setLogger(loc, address, loglevel)[source]

Sets the logger object

Parameters:
  • loc – location of the server, to prepend to every logged message
  • address – the address of the syslog server in the form of (ip-address, port)
  • loglevel – the level of logging to perform, should be one specified in the logging module
logger.warn(msg)[source]

Warning logging statement

Parameters:msg – the message to print
Returns:True – to allow it as an #assert statement