Permalink
Browse files

Add test-specific log4j.properties file

Add a log4j.properties file to be used when testing. The
difference with the main log4j.properties file is that this
version enables logging for org.apache.hadoop, which shows errors
that are otherwise hidden when running unit tests within the local
job runner.
  • Loading branch information...
gabrielreid committed Jul 9, 2012
1 parent 6bcd67d commit a3f8e4a6b53fe9117476de104cc38f5f5266430e
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/test/resources/log4j.properties
@@ -0,0 +1,11 @@
+# ***** Set root logger level to INFO and its only appender to A.
+log4j.logger.org.apache.crunch=info, A
+
+# Log warnings on Hadoop for the local runner when testing
+log4j.logger.org.apache.hadoop=warn, A
+
+# ***** A is set to be a ConsoleAppender.
+log4j.appender.A=org.apache.log4j.ConsoleAppender
+# ***** A uses PatternLayout.
+log4j.appender.A.layout=org.apache.log4j.PatternLayout
+log4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

0 comments on commit a3f8e4a

Please sign in to comment.