Code example for SimpleFormatter

0
		Date now = new Date();
		String date = df.format(now);
		String logFileName = "logs\\testlog-" + date + ".txt";
		/*Set up Logger*/ 
		FileHandler myFileHandler = new FileHandler(logFileName);
		myFileHandler.setFormatter(new SimpleFormatter());
		Logger ocajLogger = Logger.getLogger("OCAJ Logger",TestClass.class); 
		ocajLogger.setLevel(Level.ALL);
		ocajLogger.info("\nThis is a logged information message."); 
		myFileHandler.close();
	} 
 
}