Package mvpa :: Package misc :: Module verbosity :: Class DebugLogger
[hide private]
[frames] | no frames]

Class DebugLogger

source code


Logger for debugging purposes.

Expands SetLogger with ability to print some interesting information (named Metric... XXX) about current process at each debug printout

Instance Methods [hide private]
 
__init__(self, metrics=None, offsetbydepth=True, *args, **kwargs)
Initialize the logger with a set of handlers to use for output
source code
 
registerMetric(self, func)
Register some metric to report
source code
 
__call__(self, setid, msg, *args, **kwargs)
Write msg
source code
 
_setOffsetByDepth(self, b) source code

Inherited from SetLogger: register, setActiveFromString

Inherited from SetLogger (private): _setActive, _setPrintsetid

Inherited from Logger: __del__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  _known_metrics = {'asctime': <built-in function asctime>, 'pid...
Properties [hide private]
  offsetbydepth

Inherited from SetLogger: active, printsetid, registered

Inherited from Logger: handlers, lfprev

Inherited from object: __class__

Method Details [hide private]

__init__(self, metrics=None, offsetbydepth=True, *args, **kwargs)
(Constructor)

source code 

Initialize the logger with a set of handlers to use for output

Each hanlder must have write() method implemented

Overrides: object.__init__
(inherited documentation)

registerMetric(self, func)

source code 

Register some metric to report

func can be either a function call or a string which should correspond to known metrics

__call__(self, setid, msg, *args, **kwargs)
(Call operator)

source code 

Write msg

It appends a newline since most commonly each call is a separate message

Overrides: Logger.__call__
(inherited documentation)

Class Variable Details [hide private]

_known_metrics

Value:
{'vmem': lambda: parseStatus(field= 'VmSize'), 'pid': lambda: parseSta\
tus(field= 'Pid'), 'asctime': time.asctime}

Property Details [hide private]

offsetbydepth

Get Method:
unreachable(x)
Set Method:
_setOffsetByDepth(self, b)