Commits

mquigley committed 2372add

Logging support for examples.

  • Participants
  • Parent commits 264a8dc
  • Branches Dev_1.0.1
  • Tags Release_1.0.1

Comments (0)

Files changed (2)

zabbixj-examples/pom.xml

 			<artifactId>zabbixj</artifactId>
 			<version>1.0.1</version>
 		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>1.7.2</version>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.17</version>
+		</dependency>				
 
 		<dependency>
 			<groupId>junit</groupId>

zabbixj-examples/src/main/resources/log4j.properties

+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=WARN, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{MMM dd yyyy HH:mm:ss} <%p> [%C.%M()] %m%n
+
+# Log INFO from our codebase.
+log4j.logger.com.quigley=INFO