code: def set_log_file(local_file=None):
  
      
  
      default_log_file = 'default.log'
  
      _formatter = logging.Formatter(
          '%(asctime)s %(levelname)s %(filename)s[ln:%(lineno)d] %(message)s')
  
      if local_file is not None:
          default_log_file = local_file
  
      # time rotating file handler
      # _tfh = TimedRotatingFileHandler(default_log_file, when="midnight")
      _tfh = SafeFileHandler(filename=default_log_file)
      _tfh.setLevel(logging.INFO)
      _tfh.setFormatter(_formatter)
  
      logger.setLevel(logging.INFO)
  
      logger.addHandler(_tfh)
docs: 设置日志记录，按照每天一个文件，记录包括 info 以及以上级别的内容；
      日志格式采取日志文件名直接加上日期，比如 fish_test.log.2018-05-27
  
      :param:
          * local_fie: (string) 日志文件名
      :return: 无
  
      举例如下::
  
          from fishbase.fish_logger import *
          from fishbase.fish_file import *
  
          log_abs_filename = get_abs_filename_with_sub_path('log', 'fish_test.log')[1]
  
          set_log_file(log_abs_filename)
  
          logger.info('test fish base log')
          logger.warn('test fish base log')
          logger.error('test fish base log')
  
          print('log ok')