Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Sep 12, 2022
2 parents 504b786 + bc81e68 commit 2e39954
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/user-guides/debugging-techniques.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ below::
status = '200 OK'
output = b'Hello World!'

print("application debug #1", file=environ['wsgi.errors']))
print("application debug #1", file=environ['wsgi.errors'])

response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)

print("application debug #2", file=environ['wsgi.errors']))
print("application debug #2", file=environ['wsgi.errors'])

return [output]

Expand All @@ -95,7 +95,7 @@ below::

Alternatively, always use `print` as a statement rather than a function::

print >> environ['wsgi.errors']), "application debug #N"
print >> environ['wsgi.errors'], "application debug #N"

If 'wsgi.errors' is not available to the code which needs to output log
messages, then it should explicitly direct output from 'print'
Expand Down

0 comments on commit 2e39954

Please sign in to comment.