dist_tools/
mgfflogger__define.pro
Logger object to control logging.
Class description for mgfflogger
Properties
- _extra init
- output get
- name get init
name of the logger
- parent init
- format get set
format string for messages
- append set
boolean flag used when
FILENAME
property is set to determine if the any previous content should be clobbered or appended to- filename set
filename to send output to; set to empty string to send output to
stderr
; setting this property clobbers the filename if it already exists- level get set
current level of logging: 0 (none), 1 (critial), 2 (error), 3 (warning), 4 (info), or 5 (debug); can be set to an array of levels which will be cascaded up to the parents of the logger with the logger taking the last level and passing the previous ones up to its parent
Routines
result = mgfflogger::_getLevel()
Get the minimum level value of this logger and all its parents.
result = mgfflogger::_askName(obj)
Finds the name of an object, even if it does not have a NAME property.
result = mgfflogger::_getChildByName(name, container)
Returns an immediate child of a container by name.
result = mgfflogger::getByName(name)
Traverses a hierarchy of named objects using a path of names delimited with /'s.
mgfflogger::getProperty, level=level, format=format, name=name, output=output
Set properties.
mgfflogger::setProperty, level=level, format=format, filename=filename, append=append
Get properties.
mgfflogger::insertLastError
Insert the stack trace for the last error message into the log.
mgfflogger::print, msg [, level=long]
Log message to given level.
mgfflogger::flush
Flushes output.
mgfflogger::cleanup
Free resources.
result = mgfflogger::init(parent=parent, name=name, _extra=_extra)
Create logger object.
mgfflogger__define
Define instance variables.
Routine details
top mgfflogger::_getLevel
result = mgfflogger::_getLevel()
Get the minimum level value of this logger and all its parents.
Return value
long
top mgfflogger::_askName
result = mgfflogger::_askName(obj)
Finds the name of an object, even if it does not have a NAME
property.
Returns the empty string if the object does not have a NAME
property.
Return value
string
Parameters
- obj in required type=object
object to find name of
top mgfflogger::_getChildByName
result = mgfflogger::_getChildByName(name, container)
Returns an immediate child of a container by name.
Return value
object
Parameters
- name in required type=string
name of immediate child
- container in required type=object
container to search children of
top mgfflogger::getByName
result = mgfflogger::getByName(name)
Traverses a hierarchy of named objects using a path of names delimited with /'s.
Return value
object
Parameters
- name in required type=string
path of names to the desired object; names are delimited with /'s
top mgfflogger::getProperty
mgfflogger::getProperty, level=level, format=format, name=name, output=output
Set properties.
Keywords
- level
current level of logging: 0 (none), 1 (critial), 2 (error), 3 (warning), 4 (info), or 5 (debug); can be set to an array of levels which will be cascaded up to the parents of the logger with the logger taking the last level and passing the previous ones up to its parent
- format
format string for messages
- name
name of the logger
- output
top mgfflogger::setProperty
mgfflogger::setProperty, level=level, format=format, filename=filename, append=append
Get properties.
Keywords
- level
current level of logging: 0 (none), 1 (critial), 2 (error), 3 (warning), 4 (info), or 5 (debug); can be set to an array of levels which will be cascaded up to the parents of the logger with the logger taking the last level and passing the previous ones up to its parent
- format
format string for messages
- filename
filename to send output to; set to empty string to send output to
stderr
; setting this property clobbers the filename if it already exists- append
boolean flag used when
FILENAME
property is set to determine if the any previous content should be clobbered or appended to
top mgfflogger::insertLastError
mgfflogger::insertLastError
Insert the stack trace for the last error message into the log. Since stack traces are from run-time crashes they are considered to be at the CRITICAL level.
top mgfflogger::print
mgfflogger::print, msg [, level=long]
Log message to given level.
Parameters
- msg in required type=string
message to print
Keywords
- level in optional type=long
level of message
- from_mg_log in optional private type=boolean
set to indicate that the routine actually logging the message is not the one that called this method, but that it called
MG_LOG
which called this method
File attributes
Modification date: | Tue Oct 19 18:48:11 2010 |
Lines: | 296 |
Docformat: | rst rst |