rex.utilities.loggers.get_handler

get_handler(log_level='INFO', log_file=None, log_format='%(levelname)s - %(asctime)s [%(filename)s:%(lineno)d] : %(message)s')[source]

get logger handler

Parameters
  • log_level (str) – handler-specific logging level, must be key in LOG_LEVEL.

  • log_file (str) – path to the log file

  • log_format (str) – format string to use with the logging package

Returns

handler (logging.FileHandler | logging.StreamHandler) – handler to add to logger