Package mvpa :: Package base :: Module verbosity :: Class LevelLogger

[hide private]
[frames] | no frames]

# Class LevelLogger

source code

Logger which prints based on level -- ie everything which is smaller than specified level

Instance Methods | [hide private]

__init__(self, level=0, indent=" ", *args, **kwargs) Define level logger. | source code

_setLevel(self, level) Set logging level | source code

_setIndent(self, indent) Either to indent the lines based on message log level | source code

__call__(self, level, msg, *args, **kwargs) Write msg and indent using self.indent it if it was requested | source code

Inherited from `Logger`: `__del__` Inherited from `Logger` (private): `_closeOpenedHandlers`, `_getHandlers`, `_setHandlers` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]

| level = `property(fget= lambda self: self.__level, fset= _setLe`...``
| indent = `property(fget= lambda self: self.__indent, fset= _set`...``
Inherited from `Logger`: `handlers`, `lfprev`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, level=0, indent=" ", *args, **kwargs)
(Constructor)

source code

Define level logger.

It is defined by
  level, int: to which messages are reported indent, string: symbol used to indent

Overrides: object.__init__

### __call__(self, level, msg, *args, **kwargs)
(Call operator)

source code

Write msg and indent using self.indent it if it was requested

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

Overrides: Logger.__call__

Class Variable Details | [hide private]

### level

Value:

      property(fget= lambda self: self.__level, fset= _setLevel)

### indent

Value:

      property(fget= lambda self: self.__indent, fset= _setIndent)