Posts

Showing posts with the label Logging

A required class was missing while executing org.mortbay.jetty:jetty-maven-plugin

When I was running the command mvn jetty:run I got the message [ERROR] Failed to execute goal org.mortbay.jetty:jetty-maven-plugin:8.1.1.v20120215:run (default-cli) on project CabShareService: Execution default-cli of goal org.mortbay.jetty:jetty-maven-plugin:8.1.1.v20120215:run failed: A required class was missing while executing org.mortbay.jetty:jetty-maven-plugin:8.1.1.v201202 15:run: org/slf4j/impl/StaticLoggerBinder My Jetty settings were org.mortbay.jetty jetty-maven-plugin 8.1.1.v20120215 com.jolbox bonecp 0.7.1.RELEASE /${project.artifactId} src/test/resources/jetty.xml true 10 ${project.artifactId}-stop 9999  The reason of the error was that the slf4j implementation was not defined. Tried setting the Logback as the one of the better implementation ( detailed post  ) . Added the following dependency in the jetty dependencies section. ...

Application logging through SLF4J : Quick Reference

The detailed information on SLF4J is available on http://www.slf4j.org . The primary reason of writing the blog is that there is lot of information but usually people do not have the time to do into the details, hense a quick reference is required to get it going. So I would be trying to put forward all the important aspects. The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time. Reason The obvious next question was that this is what JCL (Jakarta Commons Logging: http://commons.apache.org/ ) is all about. Why was the need for another facade? SLF4J does answer to few of drawbacks but there is no specific answer to why JCL was not modified. The drawbacks which are taken care as part of SLF4J are: Parameterized log messages solve an important problem associated with logging performance. Mark...