@LocalProxy
def _proxy_stream():
    """Finds the most appropriate error stream for the application.  If a
    WSGI request is in flight we log to wsgi.errors, otherwise this resolves
    to sys.stderr.
    """
    ctx = _request_ctx_stack.top
    if ctx is not None:
        return ctx.request.environ['wsgi.errors']
    return sys.stderr
dataset/ETHPy150Open pallets/flask/flask/logging.py/_proxy_stream/original