ls_mlkit.util.log module¶
- ls_mlkit.util.log.get_and_create_new_log_dir(root='./logs', prefix='', suffix='') str[source]¶
Get and create a new log directory
- Parameters:
root (str, optional) – the root directory to save the logs. Defaults to “./logs”.
prefix (str, optional) – the prefix of the log directory. Defaults to “”.
suffix (str, optional) – the suffix of the log directory. Defaults to “”.
- Returns:
the new log directory
- Return type:
str
- ls_mlkit.util.log.get_logger(name='unnamed', log_dir: str = None) Logger[source]¶
Get a logger
- Parameters:
name (str, optional) – the name of the logger. Defaults to “unnamed”.
log_dir (str, optional) – the directory to save the logs. Defaults to None.
- Returns:
the logger
- Return type:
logging.Logger