j2se日志

package j2seLog;

import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.LogRecord;
import java.util.logging.Logger;



public class Test {
	private static Logger logger=Logger.getLogger(Test.class.getName());
	public static void main(String args[]){
		
		ConsoleHandler ch=new ConsoleHandler();
//		logger.addHandler(ch);
		logger.info("sdfafasdf");
		logger.warning("waring");
	  
             
		
	}
}

//2009-8-21 10:59:53 cn.isvi.log.j2seLog main
//信息: sdfafasdf
//2009-8-21 10:59:54 cn.isvi.log.j2seLog main
//警告: waring
 

你可能感兴趣的:(java,J2SE)