get_custom_logger#
- caf.toolkit.log_helpers.get_custom_logger(logger_name, code_version, instantiate_msg=None, log_handlers=None)[source]#
Create a standard logger using the CAF template.
Creates the logger, prints out the standard instantiation messages, and returns the logger. See get_logger() to get a default logger with default file and console handlers.
- Parameters:
logger_name (str) – The name of the new logger.
code_version (str) – A string describing the current version of the code being logged.
log_handlers (Iterable[Handler] | None) – A list of log handlers to add to the generated logger. Any valid logging handler can be accepted
instantiate_msg (str | None) – A message to output on instantiation. This will be output at the logging.DEBUG level, and will be wrapped in a line of asterisk before and after.
- Returns:
A logger with the given handlers attached
- Return type:
logger
See also
get_logger()