Log log=LogFactory.getLog(TestLog.class);
log.info("This is a info message");
log.debug("This is a debug message");
log.trace("This is a trace message");
log.error("This is a error message");
log.fatal("This is a fatal message");
log.warn("This is a warn message");
String configpath = "log4j.properties";
PropertyConfigurator.configure(configpath);
Logger logger=Logger.getLogger(TestLog.class);
logger.info("This is from logger");我通过这样的两种方法来使用通用日志器,第一种方法Log log=LogFactory.getLog(TestLog.class);他寻找配置文件是怎么寻找的?第二种方法String configpath = "log4j.properties";
PropertyConfigurator.configure(configpath);
Logger logger=Logger.getLogger(TestLog.class);使用Logger和第一种方法有什么区别?
log.info("This is a info message");
log.debug("This is a debug message");
log.trace("This is a trace message");
log.error("This is a error message");
log.fatal("This is a fatal message");
log.warn("This is a warn message");
String configpath = "log4j.properties";
PropertyConfigurator.configure(configpath);
Logger logger=Logger.getLogger(TestLog.class);
logger.info("This is from logger");我通过这样的两种方法来使用通用日志器,第一种方法Log log=LogFactory.getLog(TestLog.class);他寻找配置文件是怎么寻找的?第二种方法String configpath = "log4j.properties";
PropertyConfigurator.configure(configpath);
Logger logger=Logger.getLogger(TestLog.class);使用Logger和第一种方法有什么区别?
免费ASP.NET空间申请http://www.kingtoo.com/pdtshw/hstshw/index.asp,
支持ASP.NET1.1, 2.0
100M asp.net 空间只要50元(www.kingtoo.com)