SAFplus Runtime Director API  3.0.5
aspLog Namespace Reference

Classes

class  SubLog
 Internal (use Hierarchial Log). More...
 
class  HierarchialLog
 
class  LogClass
 A simple, non hierarchial log that outputs to the OpenClovis default application log. More...
 

Functions

def LogLvl2Str
 Convert an ASP log level integer into a string. More...
 
def Log
 Output a message to the openclovis system log and to stderr (if uncommented) More...
 
def Test
 

Variables

 hasAsp = True
 
 LogLevelError = asp.CL_LOG_SEV_ERROR
 A synonym for asp.CL_LOG_SEV_ERROR. More...
 
 LogLevelWarn = asp.CL_LOG_SEV_WARNING
 A synonym for asp.CL_LOG_SEV_WARNING. More...
 
 LogLevelInfo = asp.CL_LOG_SEV_INFO
 A synonym for asp.CL_LOG_SEV_INFO. More...
 
 LogLevelDebug = asp.CL_LOG_SEV_DEBUG
 A synonym for asp.CL_LOG_SEV_DEBUG. More...
 
list loglvl = ["undefined", "EMERGENCY","ALERT","CRITICAL","ERROR","warning", "notice", "info", "debug","trace"]
 A translation table between log level integer and a string. More...
 
tuple log = HierarchialLog()
 A global log object that sends its output to the OpenClovis default application log log = LogClass() More...
 

Function Documentation

def aspLog.Log (   s,
  loglvl = None,
  logunwind = 1 
)

Output a message to the openclovis system log and to stderr (if uncommented)

Parameters
sThe log message. Do not <cr> terminate
loglvlOptional log level (on of asp.CL_LOG_SEV_xxx values). If not passed, the "info" level is used.
logunwindOptional stack location of the original log producer. Useful if you wrap this Log function (1 is you, 2 is your parent, etc)
def aspLog.LogLvl2Str (   x)

Convert an ASP log level integer into a string.

Parameters
xThe log level integer
Returns
string log level
def aspLog.Test ( )

Variable Documentation

aspLog.hasAsp = True
aspLog.log = HierarchialLog()

A global log object that sends its output to the OpenClovis default application log log = LogClass()

int aspLog.LogLevelDebug = asp.CL_LOG_SEV_DEBUG

A synonym for asp.CL_LOG_SEV_DEBUG.

int aspLog.LogLevelError = asp.CL_LOG_SEV_ERROR

A synonym for asp.CL_LOG_SEV_ERROR.

int aspLog.LogLevelInfo = asp.CL_LOG_SEV_INFO

A synonym for asp.CL_LOG_SEV_INFO.

int aspLog.LogLevelWarn = asp.CL_LOG_SEV_WARNING

A synonym for asp.CL_LOG_SEV_WARNING.

aspLog.loglvl = ["undefined", "EMERGENCY","ALERT","CRITICAL","ERROR","warning", "notice", "info", "debug","trace"]

A translation table between log level integer and a string.

Use misc.LogLvl2Str function instead of this table.