mlpy.tools.log.LoggingMgr.add_handler

LoggingMgr.add_handler(mid, htype=0, hlevel=20, fmt=None, filename=None)[source]

Add a handler to the logger.

Parameters:

mid : str

The module id of the logger

htype : int, optional

The logging type to add to the handler. Default is LOG_TYPE_STREAM.

hlevel : int, optional

The logging level. Default is LOG_INFO.

fmt : str, optional

The format in which the information is presented. Default is “[%(levelname)-8s ] %(name)s: %(funcName)s: %(message)s”

filename : str, optional

The name of the file the file handler writes the logs to. Default is a generated filename.