[logback-user] SMTP Appender always shows DEBUG info

Ceki ceki at qos.ch
Thu Oct 31 22:14:57 CET 2019

Thank you. I think the session.setDebug got through by mistake.

Thank you for the heads up.

On 31.10.2019 21:48, Richmond, Thomas wrote:
> Using 1.3.0-alpha5 (which is, admittedly, Alpha), SMTPAppenderBase.java 
> calls session.setDebug(true) at line 124, which causes a lot of SMTP 
> info to spam the console. This is probably a merge error made during the 
> checkin of c01fde48c1b3ebb9a5066f6300fcf81be1e0965b. But if it isn’t, I 
> don’t think this should be the default behavior because:
>  1. The next line is “if (session == null)”, meaning that session can be
>     null here, meaning that session.setDebug(…) can NPE.
>  2. I don’t want debug info spammed to the console.
> If this is desired behavior, can I suggest passing a custom output 
> stream to session that passes logger info to the logger in a way that I 
> can squelch using regular logger configuration, for example as shown in 
> Karl Richter’s answer here: 
> https://stackoverflow.com/questions/6995946/log4j-how-do-i-redirect-an-outputstream-or-writer-to-loggers-writers
> Thanks for all the good work, I hope you find this helpful.
> Tom
> ------------------------------------------------------------------------
> Please be advised that this email may contain confidential information. 
> If you are not the intended recipient, please notify us by email by 
> replying to the sender and delete this message. The sender disclaims 
> that the content of this email constitutes an offer to enter into, or 
> the acceptance of, any agreement; provided that the foregoing does not 
> invalidate the binding effect of any digital or other electronic 
> reproduction of a manual signature that is included in any attachment.
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user

Ceki Gülcü

More information about the logback-user mailing list