怎样关闭Tomcat中 velocity的大量日志输出?

Mervyn 2009-11-17 02:42:13
Tomcat6,使用了 velocity。
在console中有大量的debug信息输出,怎样才能关闭呢?

输出的信息:

INFO: Velocity [debug] Left side ($xx) of '!=' operation has null value. If it is a reference, it may not be in the context or its toString() returned null. inc/nav.vm[line 61, column 51]
Nov 17, 2009 2:34:01 PM org.apache.catalina.core.ApplicationContext log
INFO: Velocity [debug] Left side ($xx) of '==' operation has null value. If it is a reference, it may not be in the context or its toString() returned null. inc/nav.vm[line 65, column 29]
Nov 17, 2009 2:34:01 PM org.apache.catalina.core.ApplicationContext log
INFO: Velocity [debug] Left side ($xx) of '==' operation has null value. If it is a reference, it may not be in the context or its toString() returned null. inc/nav.vm[line 69, column 30]
Nov 17, 2009 2:34:02 PM org.apache.catalina.core.ApplicationContext log
INFO: Velocity [debug] ResourceManager : found inc/footer.vm with loader org.apache.velocity.tools.view.WebappResourceLoader


...全文
562 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
nodbird 2010-06-07
  • 打赏
  • 举报
回复
velocity配置文件中配置下这个
runtime.log.logsystem.class=org.apache.velocity.runtime.log.Log4JLogChute

这样输出就应该和log4j中的设置一样了


velocity的配置文件在哪?
Mervyn 2009-11-18
  • 打赏
  • 举报
回复
Thanks, sang..
就是这个哈哈。
sangshusen_1988 2009-11-17
  • 打赏
  • 举报
回复
velocity配置文件中配置下这个
runtime.log.logsystem.class=org.apache.velocity.runtime.log.Log4JLogChute

这样输出就应该和log4j中的设置一样了
Mervyn 2009-11-17
  • 打赏
  • 举报
回复
是这样么?

log4j.logger.org.apache.velocity=ERROR

我试了 无效啊
wgj830823 2009-11-17
  • 打赏
  • 举报
回复
你用的log4j吧,把配置文件中的log输出级别 设置到error就可以了,相关文档g一把

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧