code: def format(
              self,
              record,
              datefmt='%Y:%m:%d %H:%M:%S.%f'):
          
  
          now = datetime.datetime.now()
          utc_now = datetime.datetime.utcnow()
          asctime = None
          if self.datefmt:
              asctime = now.strftime(
                  self.datefmt)
          else:
              asctime = now.strftime(
                  datefmt)
  
          message = {
              'time': record.created,
              'timestamp': utc_now.strftime(
                  '%Y-%m-%dT%H:%M:%S.%fZ'),
              'asctime': asctime,
              'path': record.pathname,
              'message': record.getMessage(),
              'exc': None,
              'logger_name': record.name
          }
  
          if record.exc_info and not message.get('exc'):
              message['exc'] = self.formatException(
                  record.exc_info)
          if not message.get(
                  'exc') and record.exc_text:
              message['exc'] = record.exc_text
  
          log_record = {}
          try:
              log_record = OrderedDict()
          except NameError:
              log_record = {}
          # end of try/ex
  
          message.update(
              self.fields_to_add)
          self.add_fields(
              log_record,
              record,
              message)
          use_log_record = self.process_log_record(
              log_record)
          return '{}{}'.format(
              self.prefix,
              self.jsonify_log_record(
                  use_log_record))
docs: format
  
          :param record: message object to format