Press "Enter" to skip to content

Tag: Good Code

Redirecting the System.out and System.err streams to a Logger

I’m working on a project where no logging was done, but a lot of information is printed out to System.out and System.err (Most exceptions print out their stack traces as well).

While this is not ideal, it is much better than nothing, and this is why: You can redirect the standard output streams to any java.io.OutputStream.