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')

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' )
formats a log message similar to gevents pywsgi request logging .