飞哥:王乃飞是也

吾今日偶遇一bug,控台曰:

log4j:WARN No appenders could be found for logger (com.wdg.dao.CRUDUtil).
log4j:WARN Please initialize the log4j system properly.

因吾将log4j.jar buildpath 工程,且想打log在控台,谁知bug来袭

何解,飞哥吾大哥也,曰:"吾日三省吾身",对曰:"高人也,何以对"

飞哥皱眉,高呼:"I will give you a file which is log4j.properties,you create copy to your src file"

吾对曰:"可解乎"

飞哥笑而不语。吾心中默叹:"真乃高人也"。

做之。

控台nobug,心中佩服又增之。

今吾望天下有此bug之士,都可解!log4j.properties

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %m%n
log4j.category.org.hibernate.tool.hbm2ddl=DEBUG

log4j.category.org.hibernate.SQL=DEBUG

log4j.rootLogger=info, stdout


志同道合。莫谢!