Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

Commit

Permalink
wsgi logger
Browse files Browse the repository at this point in the history
  • Loading branch information
lsbardel committed Oct 8, 2015
1 parent fc1a2ad commit 74d1e6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pulsar/apps/wsgi/server.py
Expand Up @@ -61,7 +61,8 @@ def test_wsgi_environ(path=None, method=None, headers=None, extra=None,
parsed = urlparse(path)
if 'host' not in request_headers:
if not parsed.netloc:
path = '%s://127.0.0.1' % ('https' if secure else 'http')
scheme = ('https' if secure else 'http')
path = '%s://127.0.0.1%s' % (scheme, path)
else:
request_headers['host'] = parsed.netloc
#
Expand Down
4 changes: 2 additions & 2 deletions pulsar/apps/wsgi/utils.py
Expand Up @@ -238,8 +238,8 @@ def handle_wsgi_error(environ, exc):
path = '@ %s "%s"' % (request.method, request.path)
status = response.status_code
if status >= 500:
LOGGER.critical('Unhandled exception during HTTP response %s.\n%s',
path, dump_environ(environ), exc_info=exc_info)
LOGGER.critical('%s - %s.\n%s', exc, path,
dump_environ(environ), exc_info=exc_info)
else:
log_wsgi_info(LOGGER.warning, environ, response.status, exc)
if has_empty_content(status, request.method) or status in REDIRECT_CODES:
Expand Down

0 comments on commit 74d1e6e

Please sign in to comment.