2 Minutes To Code (β Version)

Log4j - 2 minute tutorial

How to make log files rotate per minute or hour using log4j.properties

		log4j.rootLogger=INFO, loggerId
		log4j.appender.loggerId=org.apache.log4j.DailyRollingFileAppender
		log4j.appender.loggerId.layout=org.apache.log4j.PatternLayout
		log4j.appender.loggerId.layout.ConversionPattern=%d [%t] %-5p (%F:%L) - %m%n
		log4j.appender.loggerId.File=example
		log4j.appender.loggerId.DatePattern='-'yyyyMMdd-HHmm'.log'