We would like to make jetty use log4j configuration for logging. I am using
embedded jetty within spring based on this
tutorial<http://www.springbyexample.org/examples/embedded-spring-web-services.html>.
I am followed this documentation
<http://www.eclipse.org/jetty/documentation/current/example-logging-log4j.html>to
include all required slf4j and log4j dependencies in classpath.

Basically I added jetty-logging.properties to classpath with following
configuration.

org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4Log
org.eclipse.jetty.LEVEL=INFO

I also have log4j.properties in classpath

I have following maven dependencies to include required jars.

                <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.log4j.version}</version>
</dependency>

                <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.maven.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>8.1.9.v20130131</version>
</dependency>


But when I start up the jetty server via spring, the log output is always
logged to StdErr and it's not logging to log file I configured in
log4j.properties. Am  I missing anything? Is there any debugging I can turn
on to troubleshoot ..? How can I get this to work?

-- 
Thanks,
Raja.
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to