[logback-user] SMTP Appender always shows DEBUG info
Richmond, Thomas
thomas.richmond at tektronix.com
Thu Oct 31 21:48:43 CET 2019
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20191031/3a1e5aba/attachment.html>
More information about the logback-user
mailing list