日期:2014-05-17 浏览次数:20793 次
public String create()throws Exception { try { logger.warn("添加企业信息"); enterpriseServiceDAO.Create(enterprise); logger.info("添加企业信息11"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); logger.error("企业信息添加失败!"); return "input"; } return "create"; }
log4j.rootLogger=INFO,db log4j.appender.db=org.apache.log4j.jdbc.JDBCAppender log4j.appender.db.BufferSize=10 log4j.appender.db.URL=jdbc\:jtds\:sqlserver\://server\:1434/pcbsyn log4j.appender.db.driver=net.sourceforge.jtds.jdbc.Driver log4j.appender.db.user=sa log4j.appender.db.password=711 log4j.appender.db.sql=insert into logInfo(userId,userName,lclass,lmethod,lTime,llevel,message) values ('%X{userId}','%X{userName}','%C','%M','%d{yyyy-MM-dd HH\:mm\:ss}','%p','%m') log4j.appender.db.layout=org.apache.log4j.PatternLayout