tag:blogger.com,1999:blog-7836204352369514180.post4852786737281554108..comments2022-03-25T05:11:20.110+01:00Comments on Around the World in Java: Logging with SLF4J and Logback in Tomcat and TomEEHarald Wellmannhttp://www.blogger.com/profile/08039976160321882828noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-7836204352369514180.post-87071201917336121572014-05-15T11:51:19.953+02:002014-05-15T11:51:19.953+02:00Thank you!Thank you!Zmirchttps://www.blogger.com/profile/00728498055238384219noreply@blogger.comtag:blogger.com,1999:blog-7836204352369514180.post-42067880423503939592013-12-04T08:52:17.266+01:002013-12-04T08:52:17.266+01:00Looks interesting, I'm going to give it a try....Looks interesting, I'm going to give it a try.<br /><br />Thanks for sharingAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7836204352369514180.post-8943778635352484622013-05-10T16:54:38.583+02:002013-05-10T16:54:38.583+02:00
Thanks for the tutorial. I am currently facing a ...<br />Thanks for the tutorial. I am currently facing a Handler error issue. Could you please let me know what I could be missing?<br /><br />Here is the SO link http://stackoverflow.com/questions/16472801/handler-error-in-slf4jbridgehandlerDolphy Fernandeshttps://www.blogger.com/profile/14256005241302190265noreply@blogger.comtag:blogger.com,1999:blog-7836204352369514180.post-76528469872893544822013-01-21T18:29:11.432+01:002013-01-21T18:29:11.432+01:00yes, I did put all jars in classpath.yes, I did put all jars in classpath.Anonymoushttps://www.blogger.com/profile/00786934234799567374noreply@blogger.comtag:blogger.com,1999:blog-7836204352369514180.post-34837668169691733342013-01-20T20:08:55.775+01:002013-01-20T20:08:55.775+01:00Marcin, I've never used a Groovy config file f...Marcin, I've never used a Groovy config file for logback myself, but I suppose it requires a Groovy runtime. <br /><br />Did you add Groovy (and any transitive dependencies) to Tomcat's classpath, in addition to the SLF4J and Logback JARs?Harald Wellmannhttps://www.blogger.com/profile/08039976160321882828noreply@blogger.comtag:blogger.com,1999:blog-7836204352369514180.post-18600821009999686832013-01-20T13:30:14.995+01:002013-01-20T13:30:14.995+01:00Anybody tried this with Groovy config file? This w...Anybody tried this with Groovy config file? This works fine with XML but I had few issues using Groovy.<br /><br />Here is logback.groovy:<br />------------------------------------<br />import ch.qos.logback.classic.encoder.PatternLayoutEncoder<br />import ch.qos.logback.core.ConsoleAppender<br />import ch.qos.logback.core.FileAppender<br /><br />import static ch.qos.logback.classic.Level.INFO<br /><br />appender("STDOUT", ConsoleAppender) {<br /> encoder(PatternLayoutEncoder) {<br /> pattern = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"<br /> }<br />}<br />appender("LOGFILE", FileAppender) {<br /> file = "${catalina.base}/logs/tomcat.log"<br /> encoder(PatternLayoutEncoder) {<br /> pattern = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"<br /> }<br />}<br />root(INFO, ["STDOUT", "LOGFILE"])<br />----------------------------------Anonymoushttps://www.blogger.com/profile/00786934234799567374noreply@blogger.comtag:blogger.com,1999:blog-7836204352369514180.post-68210212757968145212013-01-16T19:33:28.725+01:002013-01-16T19:33:28.725+01:00Thanks, you're absolutely right. I've adde...Thanks, you're absolutely right. I've added the missing bit to my post.Harald Wellmannhttps://www.blogger.com/profile/08039976160321882828noreply@blogger.comtag:blogger.com,1999:blog-7836204352369514180.post-16868202839866366722013-01-16T15:25:54.526+01:002013-01-16T15:25:54.526+01:00I think you omitted the piece that needs to be add...I think you omitted the piece that needs to be added to logging.properties to activate the jul-slf4j bridge...<br /><br />handlers = org.slf4j.bridge.SLF4JBridgeHandlerMichael Wileshttps://www.blogger.com/profile/06655030771595145734noreply@blogger.com