[Andrius]
> So it is not possible to consistently manage stderr when it involves > logging library without explicitly "manage" it?
That's what I think, at least from within a script. To me redirect_xxx() always looked like a workaround to have old code write to a destination that was unforeseen in the initial design. I prefer
dump_stuff(dest)
to
with redirect_stdout(dest):
dump_stuff()
That said -- do you have a suggestion how the logging library could be adapted to work smoothly with redirect_xxx()?
(A compelling use case would also be nice, but note that I'm not the one who makes the decisions.) |