Skip to content

Commit

Permalink
Move logging back into main.
Browse files Browse the repository at this point in the history
I think it's better for the wsgi application server to configure logging.
  • Loading branch information
markdoliner committed Jan 31, 2015
1 parent 5e43454 commit c4058d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion check_xmpp_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ def _handle_request(env, start_response):

def application(env, start_response):
"""WSGI application entry point."""
logging.basicConfig(filename='log')

try:
return _handle_request(env, start_response)
Expand All @@ -541,5 +540,7 @@ def application(env, start_response):
raise

if __name__ == '__main__':
logging.basicConfig(filename='log')

import gevent.wsgi
gevent.wsgi.WSGIServer(('', 1000), application=application).serve_forever()

0 comments on commit c4058d2

Please sign in to comment.