如何禁用速度日志

编程入门 行业动态 更新时间:2024-10-09 04:25:42
本文介绍了如何禁用速度日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直试图禁用Velocity日志,到目前为止我发现的唯一方法是设置:

I've been trying to disable Velocity logs, and the only way I've found so far with positive results is to set:

runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogSystem

但位于velocity.jar内的velocity.properties内。

but inside the velocity.properties that resides inside the velocity.jar.

我在Web应用程序(tomcat)上下文中使用了velocity。有没有办法禁用速度(通过设置以前的属性或其他)但不修改JAR ??

I'm using velocity in a Web Application (tomcat) context. Is there any way to disable the velocity (by setting the previous property or whatever) BUT without modifying the JAR??

无法修改任何代码

提前致谢

推荐答案

一般:只需添加以下内容到你的 velocity.properties :

In general: just add following line to your velocity.properties :

runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute

问题:这取决于速度引擎的加载方式。是否可以为其提供自定义 velocity.properties 文件? 例如Solr的 VelocityResponseWriter 有一个名为 v.properties 的属性(或 init。当前版本中的properties.file 。 看,如果在代码中某处调用方法 org.apache.velocity.app.VelocityEngine.init(属性) ...

To your question: It depends on how the velocity engine is loaded. Is it possible to give it a custom velocity.properties file? For example Solr's VelocityResponseWriter has such property called v.properties (or init.properties.file in current versions). Look, if the method org.apache.velocity.app.VelocityEngine.init(Properties) is called somewhere in the code...

更多推荐

如何禁用速度日志

本文发布于:2023-11-25 21:26:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631408.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:速度   日志

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!