code: def format_log(request, message_type, message):
      
      from django_socketio.settings import MESSAGE_LOG_FORMAT
      if MESSAGE_LOG_FORMAT is None:
          return None
      now = datetime.now().replace(microsecond=0)
      args = dict(request.META, TYPE=message_type, MESSAGE=message, TIME=now)
      return (MESSAGE_LOG_FORMAT % args) + "\n"
docs: Formats a log message similar to gevent's pywsgi request logging.