code: def json_record(self, message, extra, record, traceback):
          
          extra['message'] = message
          if 'time' not in extra:
              extra['time'] = datetime.now(pytz.utc)
          if traceback is not None:
              extra['traceback'] = traceback
          return extra
docs: Prepares a JSON payload which will be logged.
  
          Override this method to change JSON log format.
  
          :param message: Log message, e.g., `logger.info(msg='Sign up')`.
          :param extra: Dictionary that was passed as `extra` param
              `logger.info('Sign up', extra={'referral_code': '52d6ce'})`.
          :param record: `LogRecord` we got from `JSONFormatter.format()`.
          :return: Dictionary which will be passed to JSON lib.