首页 热点资讯 义务教育 高等教育 出国留学 考研考公

如何让SSH的项目输出日志

发布网友 发布时间:2022-04-26 17:26

我来回答

2个回答

热心网友 时间:2023-10-17 06:09

你参考下
http://bbs.chinaunix.net/thread-1621517-1-1.html

另外附上我自己的配置文件

#
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
#
# The five logging levels used by Log are (in order):
#
# 1. DEBUG (the least serious)
# 2. INFO
# 3. WARN
# 4. ERROR
# 5. FATAL (the most serious)

# Set root logger level to WARN and append to stdout
log4j.rootLogger=INFO, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n

#
log4j.appender.R=org.apache.log4j.FileAppender
#
log4j.appender.R.file=crm.log
#
log4j.appender.R.DatePattern='.'yyyy-MM-dd
#
log4j.appender.R.Append=true
#
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#
log4j.appender.R.layout.ConversionPattern=%n%n%d%p[%c]-%m%n

# Print only messages of level ERROR or above in the package noMole.
log4j.logger.noMole=FATAL

# OpenSymphony Stuff
log4j.logger.com.opensymphony=INFO
log4j.logger.org.apache.struts2=DEBUG

# Spring Stuff
log4j.logger.org.springframework=INFO

# Jbpm
log4j.logger.org.jbpm=INFO

# Hibernate debugging levels and their output
log4j.logger.org.hibernate=INFO
log4j.logger.org.hibernate.SQL=DEBUG
log4j.logger.org.hibernate.type=TRACE
log4j.logger.org.hibernate.transaction=INFO

热心网友 时间:2023-10-17 06:10

http://www.javaeye.com/topic/378077
推荐文章 一看就会

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com