Archive

Archive for June, 2011

Disable INFO logging from AWS Java SDK

June 22, 2011 Leave a comment

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:

  1. cd /usr/share/jetty/lib/jsp2.1
  2. sudo rm slf4j-simple.jar
  3. sudo ln -s ../../../java/slf4j-jdk14.jar slf4j-jdk14.jar
  4. create /usr/share/jetty/webapps/root/WEB-INF/logging.properties with
    .level=WARNING
  5. cd /etc/defaults
  6. edit jetty and add:
    JAVA_OPTIONS=-Djava.util.logging.config.file=/usr/share/jetty/webapps/root/WEB-INF/logging.properties
Tags: , , ,
Follow

Get every new post delivered to your Inbox.