java - How to redirect javax.mail.Session setDebugOut to log4j logger? -
To redirect to javax.mail. Session setDebugOut for log4j logger?
Is it possible to only redirect the mailsion logger it is possible to redirect?
I mean, there are solutions like
which re-all standard output to go to log4j
-
Library is a useful category that you can use for this precise purpose:
LogOnput stream LaosOutOut = new logoutputstream () {@ Override protected zero process line (string line, int level } {Cat.debug (line); }}; Session session = session .get default instant (new property (empty)); Session.setDebugOut (new printstream (Los SeAntAut));
Cat obviously log4j category / appenders
Comments
Post a Comment