2 Minutes To Code (β Version)

Log4j - 2 minute tutorial

How to configure multiple appender for a logger using log4j.properties

		log4j.rootLogger=INFO, loggerIdOne, loggerIdTwo 
		log4j.appender.loggerIdOne=org.apache.log4j.ConsoleAppender
		log4j.appender.loggerIdOne.layout=org.apache.log4j.PatternLayout
		log4j.appender.loggerIdTwo=org.apache.log4j.RollingFileAppender
		log4j.appender.loggerIdTwo.layout=org.apache.log4j.PatternLayout
		log4j.appender.loggerIdTwo.layout.ConversionPattern=%d [%t] %-5p (%F:%L) - %m%n
		log4j.appender.loggerIdTwo.File=example.log