code: def get_file_logger(filename):
      """
      Set logger.handler to FileHandler.
  
      Args:
          filename(str): filename to logging
  
      Examples:
      .. code-block:: python
  
          logger = get_file_logger('test.log')
          logger.logger.info('test_1')
      """
      log_name = os.path.join(LOG_HOME, filename)
      if log_name in loggers:
          return loggers[log_name]
  
      logger = Logger()
      logger.logger.handlers = []
      format = logging.Formatter(
          "[%(asctime)-15s] [%(levelname)8s] - %(message)s"
      )
      sh = logging.FileHandler(filename=log_name, mode="a")
      sh.setFormatter(format)
      logger.logger.addHandler(sh)
      logger.logger.setLevel(logging.INFO)
  
      loggers.update({log_name: logger})
  
      return logger
  
imports: import contextlib
  import copy
  import functools
  import logging
  import os
  import sys
  import time
  import threading
  from typing import List
  import colorlog
  from colorama import Fore
  import paddlehub.config
  from paddlehub.env import LOG_HOME
label_desc: Use image node_id 1 for calling a global function with example usage: get_file_logger(filename) and returns: logger, loggers