如何配置关闭Velocity的日志输出
若以下回答无法解决问题,邀请你更新回答
1个回答
展开全部
1、velocity.properties
input.encoding = utf-8
output.encoding =utf-8
runtime.log.logsystem.class=org.apache.velocity.runtime.log.Log4JLogChute
runtime.log.logsystem.log4j.logger=velocity
log4j.logger.org.apache.velocity=ERROR
2、log4j.properties
log4j.rootLogger=INFO, stdout,E
log4j.logger.com.XX=INFO
log4j.logger.org.apache.velocity=ERROR
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %C{1} : %m%n
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.File=${catalina.base}/logs/XX.log
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
app.webTitle cannot be resolved.
input.encoding = utf-8
output.encoding =utf-8
runtime.log.logsystem.class=org.apache.velocity.runtime.log.Log4JLogChute
runtime.log.logsystem.log4j.logger=velocity
log4j.logger.org.apache.velocity=ERROR
2、log4j.properties
log4j.rootLogger=INFO, stdout,E
log4j.logger.com.XX=INFO
log4j.logger.org.apache.velocity=ERROR
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %C{1} : %m%n
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.File=${catalina.base}/logs/XX.log
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
app.webTitle cannot be resolved.
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询