Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using slf4j+logback for nimrod logs and keeping log4j for everything …

…else.
  • Loading branch information...
commit 41156b826d11fb7356da91b589e0d7e912584661 1 parent 9c618f0
@sbtourist sbtourist authored
View
26 pom.xml
@@ -275,14 +275,34 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>jms</artifactId>
+ <groupId>javax.jms</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jmxtools</artifactId>
+ <groupId>com.sun.jdmk</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jmxri</artifactId>
+ <groupId>com.sun.jmx</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- <version>1.6.4</version>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.hp.hpl.jena</groupId>
View
11 src/main/resources/log4j.properties
@@ -11,13 +11,4 @@ log4j.appender.logfile.MaxBackupIndex=3
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
-log4j.category.org.jets3t=DEBUG
-
-# Nimrod logging:
-log4j.appender.TASKS=org.apache.log4j.FileAppender
-log4j.appender.TASKS.File=/usr/local/jetties/atlas-processing/tasks.log
-log4j.appender.TASKS.layout=org.apache.log4j.PatternLayout
-log4j.appender.TASKS.layout.ConversionPattern=%d %p [%c] - <%m>%n
-log4j.logger.nimrod.alert.tasks=DEBUG, TASKS
-log4j.logger.nimrod.gauge.tasks=DEBUG, TASKS
-log4j.additivity.nimrod=false
+log4j.category.org.jets3t=DEBUG
View
25 src/main/resources/logback.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <appender name="TASKS" class="ch.qos.logback.core.FileAppender">
+ <file>/usr/local/jetties/atlas-processing/tasks.log</file>
+ <encoder>
+ <Pattern>%d{HH:mm:ss.SSS} [%thread] %level %logger - %msg%n</Pattern>
+ </encoder>
+ </appender>
+
+ <root>
+ <level value="ERROR"/>
+ </root>
+
+ <logger name="nimrod.alert.tasks">
+ <level value="INFO"/>
+ <appender-ref ref="TASKS"/>
+ </logger>
+
+ <logger name="nimrod.gauge.tasks">
+ <level value="INFO"/>
+ <appender-ref ref="TASKS"/>
+ </logger>
+
+</configuration>
Please sign in to comment.
Something went wrong with that request. Please try again.