This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andriusl
Recipients andriusl, peter.otten, vinay.sajip, xtreak
Date 2019-03-05.15:36:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551800206.31.0.709870130443.issue36193@roundup.psfhosted.org>
In-reply-to
Content
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 stream and what to do after I was done with capturing stderr (just reset back where it would be on default).

Though I actually wanted to just capture stdout and stderr indirectly, meaning I don't want to specifically initiate logging object or modify it.

I mean, I want to just capture any stdout/stderr that would be outputed while running some function that was passed via `target` argument (in my capture_output function). In this case, some function that I capture output from, might have some different way to handle sys.stderr (e.g. different basicConfig or some other implementation where sys.stderr is handled?).

So it is not possible to consistently manage stderr when it involves logging library without explicitly "manage" it?

P.S. don't know if I'm clear enough, so please ask me to clarify anything if its not clear..:)
History
Date User Action Args
2019-03-05 15:36:46andriuslsetrecipients: + andriusl, vinay.sajip, peter.otten, xtreak
2019-03-05 15:36:46andriuslsetmessageid: <1551800206.31.0.709870130443.issue36193@roundup.psfhosted.org>
2019-03-05 15:36:46andriusllinkissue36193 messages
2019-03-05 15:36:46andriuslcreate