nailgun wsgi logging to apache

This commit is contained in:
Nikolay Markov 2012-09-21 13:32:57 +04:00
parent 353f656d93
commit a9597626b4
2 changed files with 4 additions and 1 deletions

View File

@ -260,7 +260,7 @@ class ClusterChangesHandler(JSONHandler):
allowed_statuses = ("discover", "ready")
for node in cluster.nodes:
if node.status not in allowed_statuses:
raise Exception(
raise web.badrequest(
"Node %s (%s) status:%s not in %s" % (
node.mac,
node.ip,

View File

@ -1,11 +1,14 @@
import os
import sys
import logging
import web
curdir = os.path.dirname(__file__)
sys.path.insert(0, curdir)
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
from api.handlers import check_client_content_type
from db import load_db_driver
from urls import urls