Posted on 2011-06-22
We're using the AWS Java SDK and had an incredibly difficult time figuring out how to disable INFO-level logging. This is probably particular to our configuration, but I think it is a fairly common setup: Jetty on Ubuntu on EC2. The problem is that Jetty uses SLF4J, and includes the default slf4j-simple.jar which logs everything. In order to fix it, you have to remove the symlink in /usr/share/jetty/lib/jsp2.1 and create a new symlink to slf4j-jdk14.jar (and the configure java logging to not log at INFO). Step by step:JAVA_OPTIONS=-Djava.util.logging.config.file=/usr/share/jetty/webapps/root/WEB-INF/logging.properties
The above did not work with Jetty9 on Ubuntu 14.04 (Trusty Tahir). Instead add the following to /etc/default/jetty9
:
JAVA_OPTIONS="$JAVA_OPTIONS -Dorg.apache.commons.logging.simplelog.defaultlog=warn"
Tags: aws jetty logging ubuntu