mlpy.tools.log.LoggingMgr.get_logger¶
-
LoggingMgr.
get_logger
(mid, level=20, htype=0, fmt=None, verbose=True, filename=None)[source]¶ Get the logger instance with the identified mid.
If a logger with the mid does not exist, a new logger will be created with the given settings. By default only a stream handler is attached to the logger.
Parameters: mid : str
The module id of the logger.
level : int, optional
The top level logging level. Default is LOG_INFO.
htype : int, optional
The logging type of handler. Default is LOG_TYPE_STREAM.
fmt : str, optional
The format in which the information is presented. Default is “[%(levelname)-8s ] %(name)s: %(funcName)s: %(message)s”
verbose : bool, optional
The verbosity setting of the logger. Default is True
filename : str, optional
The name of the file the file handler writes the logs to. Default is a generated filename.
Returns: The logging instance.