SAFplus Runtime Director API  3.0.5
aspLog.HierarchialLog Class Reference

Public Member Functions

def __init__
 A logging system that allows logs to be organised in a hierarchial fashion. More...
 
def AddListener
 
def SubLog
 Put all logs generated by calling op under SubLog. More...
 
def SubLogStart
 Put subsequent logs down in a hierarchy. More...
 
def SubLogEnd
 Go back to the parent log level. More...
 
def Log
 Write out a log. More...
 
def info
 convenience function to output info logs loglvl and logunwind parameters must be specified in name=value format More...
 
def warn
 convenience function to output warning logs loglvl and logunwind parameters must be specified in name=value format More...
 
def error
 convenience function to output error logs loglvl and logunwind parameters must be specified in name=value format More...
 
def debug
 convenience function to output debug logs loglvl and logunwind parameters must be specified in name=value format More...
 
def __str__
 

Public Attributes

 parent
 
 listeners
 
 log
 
 curlog
 

Constructor & Destructor Documentation

def aspLog.HierarchialLog.__init__ (   self)

A logging system that allows logs to be organised in a hierarchial fashion.

Member Function Documentation

def aspLog.HierarchialLog.__str__ (   self)
def aspLog.HierarchialLog.AddListener (   self,
  listener 
)
def aspLog.HierarchialLog.debug (   self,
  s,
  kw 
)

convenience function to output debug logs loglvl and logunwind parameters must be specified in name=value format

Parameters
sThe log message. Do not terminate with a
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.HierarchialLog.error (   self,
  s,
  kw 
)

convenience function to output error logs loglvl and logunwind parameters must be specified in name=value format

Parameters
sThe log message. Do not
terminate
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.HierarchialLog.info (   self,
  s,
  kw 
)

convenience function to output info logs loglvl and logunwind parameters must be specified in name=value format

Parameters
sThe log message. Do not terminate with a
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.HierarchialLog.Log (   self,
  s,
  kw 
)

Write out a log.

Parameters
sThe log message. Do not
terminate
loglvlOptional log level (one 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.HierarchialLog.SubLog (   self,
  op 
)

Put all logs generated by calling op under SubLog.

This is just a convenience function for SubLogStart(); op(); SubLogEnd();

Parameters
opA function requiring no parameters.
def aspLog.HierarchialLog.SubLogEnd (   self)

Go back to the parent log level.

def aspLog.HierarchialLog.SubLogStart (   self)

Put subsequent logs down in a hierarchy.

def aspLog.HierarchialLog.warn (   self,
  s,
  kw 
)

convenience function to output warning logs loglvl and logunwind parameters must be specified in name=value format

Parameters
sThe log message. Do not
terminate
logunwindOptional stack location of the original log producer. Useful if you wrap this Log function (1 is you, 2 is your parent, etc)

Member Data Documentation

aspLog.HierarchialLog.curlog
aspLog.HierarchialLog.listeners
aspLog.HierarchialLog.log
aspLog.HierarchialLog.parent