Skip to main content

wsgi_errors_stream

Find the most appropriate error stream for the application. If a request is active, log to wsgi.errors, otherwise use sys.stderr.

def wsgi_errors_stream() - > TextIO

Find the most appropriate error stream for the application. If a request is active, log to wsgi.errors, otherwise use sys.stderr.

Returns

TypeDescription
TextIOThe active WSGI error stream if within a request context, otherwise the standard error stream (sys.stderr).