How can I setDebug(true) in a JavaMail session, but capture the stream and use it in my logging system? (Except for loading the source, changing the method to accept the stream as a parameter, recompiling it, ...)
More generally, is there a standard way in Java to generate a shared stream in hijack-and-redirect this way? Note that System.out may already be polluted with another output, and I have no idea how to "filter" this ...
java stream javamail
Robottinosino
source share