You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to log to stderr (see #2492), and I also want to use TestWriter so that logging works in tests. As far as I can tell, TestWriter logs to stdout and there is no way to configure it to work differently.
My first thought was that there might be a layer that would combine two writers. But if I understand TestWriter, it logs to stdout directly, and so at best I could log to stdout and stderr both.
Am I misunderstanding how this works? Can the two be combined somehow?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to log to stderr (see #2492), and I also want to use TestWriter so that logging works in tests. As far as I can tell, TestWriter logs to stdout and there is no way to configure it to work differently.
My first thought was that there might be a layer that would combine two writers. But if I understand TestWriter, it logs to stdout directly, and so at best I could log to stdout and stderr both.
Am I misunderstanding how this works? Can the two be combined somehow?
Beta Was this translation helpful? Give feedback.
All reactions