Andrius Laukavičius added the comment:
Ok. Thanks for the clarification.
On Thu, Mar 7, 2019, 08:13 Vinay Sajip wrote:
>
> Vinay Sajip added the comment:
>
> The StreamHandler allows you to specify *exactly* which stream you want to
> use to log to; sys.stderr is provided
Andrius Laukavičius added the comment:
Peter,
well I don't have deep experience with logging lib to know all ins and outs. So
I might not be correct person to define what should be changed specifically.
But I think it should be consistent on all standard libraries how it handles
s
Andrius Laukavičius added the comment:
Peter Otten thanks for examples,
though with capture_output function, I had a little bit different intentions.
At first I actually did similarly as you described in case 2, where I called
BasicConfig explicitly. Then I could specify where to redirect
New submission from Andrius Laukavičius :
It looks like logging library uses always first assigned stderr object and
won't change it even if it was reset.
capture_output function redirects stdout and stderr to io.StringIO object,
saves what was captured in string and returns it. And