如题,现在正在用 Hibernate 4 写些东西, 发现 Logger 可以用 JBoss 的 Logger 来做。看资料说,这是一个外观模式,最后的实现还是 Log4J 可是怎么配置呢?我倒是有个已配置文件,但是出来的好像和我要的不一样,所以认为配置文件无效,代码 和 图片 都已经上传了,大家帮忙看看// 只把关键的核心代码贴出来了
package A;
import org.jboss.logging.Logger;
public class CollectorAgent {
public static void main(String[] args) {
// TODO Auto-generated method stub
CollectorAgent ca = new CollectorAgent();
ca.initialization();
}
public CollectorAgent()
{
logger.info("Construction function begin");
m_pmger = new PersistenceManager();
m_scannerAgent_lister = new Vector();
logger.info("Construction function finished");
}
}
Hibernate
package A;
import org.jboss.logging.Logger;
public class CollectorAgent {
public static void main(String[] args) {
// TODO Auto-generated method stub
CollectorAgent ca = new CollectorAgent();
ca.initialization();
}
public CollectorAgent()
{
logger.info("Construction function begin");
m_pmger = new PersistenceManager();
m_scannerAgent_lister = new Vector();
logger.info("Construction function finished");
}
}
Hibernate
jboss那个可能只是他自己用的,并不会调用的的日志配置文件,