2 Minutes To Code (β Version)

Log4j - 2 minute tutorial

How to make log files rotate every day programmatically

		package com.techfundaes.log4j;

		import org.apache.log4j.BasicConfigurator;
		import org.apache.log4j.Logger;

		public class ProgrammaticConfigBasic
		{
			public static void main(String[] args)
			{
				BasicConfigurator.configure();
				Logger logger = Logger.getLogger(ProgrammaticConfigBasic.class);
				logger.info("Yeah..it works !");
			}
		}