Skip to content

Commit

Permalink
wsgi log supression
Browse files Browse the repository at this point in the history
  • Loading branch information
guyromm committed Aug 8, 2011
1 parent 761b2f8 commit 18a994c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions app.py
Expand Up @@ -63,9 +63,14 @@ def noodlesapp(env, start_response):
# Start server function, you may specify port number here
def startapp():
try:
from config import PORT
from config import PORT,SERVER_LOGTYPE
except ImportError:
PORT = 8088 # By defaultl 8088 debug port
print 'Start server on %i...' % PORT
server.WebSocketServer(('', PORT), noodlesapp).serve_forever()
if SERVER_LOGTYPE=='supress':
import StringIO
s = StringIO.StringIO()
else:
s = SERVER_LOGTYPE
server.WebSocketServer(('', PORT), noodlesapp,log=s).serve_forever()
#WSGIServer(('', PORT), noodlesapp).serve_forever()
2 changes: 1 addition & 1 deletion controllers/static.py
Expand Up @@ -87,5 +87,5 @@ def index(request, path_info):
response.headerlist = [('Content-type', mime_type)]

# This seems to be clear, return this response object

return response

0 comments on commit 18a994c

Please sign in to comment.