Package pylearn :: Package shared :: Package layers :: Module util
[hide private]

Module util

source code

A few little internal functions

Functions [hide private]
 
update_locals(obj, dct) source code
 
LogFn(f) source code
 
add_logging(cls, name=None, level=None)
Add logging functions to a class: self._debug, self._info, self._warn, self._warning, self._error.
source code

Imports: logging


Function Details [hide private]

add_logging(cls, name=None, level=None)

source code 

Add logging functions to a class: self._debug, self._info, self._warn, self._warning, self._error.

All of these functions has the same signature. They accept a variable number of positional arguments, and print them all casted to string (and concatenated with a ' '.)

:type name: str :param name: the name of the logger.

:type level: None, str, type(logging.INFO) :param level: a logging level (e.g. logging.INFO), or the name of a logging level (e.g 'INFO'). If level is None, then this function doesn't set the logging level.