2 Minutes To Code (β Version)

Log4j - 2 minute tutorial

How to configure multiple logger for the app using log4j.properties

		log4j.rootLogger=INFO, loggerId
		log4j.appender.loggerId=org.apache.log4j.ConsoleAppender
		log4j.appender.loggerId.layout=org.apache.log4j.PatternLayout
		log4j.logger.com.techfundaes.log4j.BasicUse=DEBUG, loggerId2
		log4j.appender.loggerId2=org.apache.log4j.RollingFileAppender
		log4j.appender.loggerId2.layout=org.apache.log4j.PatternLayout
		log4j.appender.loggerId2.layout.ConversionPattern=%d [%t] %-5p (%F:%L) - %m%n
		log4j.appender.loggerId2.File=example.log