将log4j.properties转换为log4j.xml的脚本 [英] Script to convert log4j.properties to log4j.xml
问题描述
我需要使用自定义过滤器,所以我需要将一些长log4j.properties文件转换为log4j.xml。
I need to use custom filters, so I need to convert some long log4j.properties files to log4j.xml.
是否有人知道这样做的工具,还是愿意贡献他们曾经使用过的?到目前为止搜索没有找到这样的工具。
Is anyone aware of a tool to do this, or willing to contribute one they have used? Searching has thus far turned up no such tool.
推荐答案
我也需要这样做,但找不到工具。手动迁移数十个log4j.properties并不是一个可口的选择。所以,我把一个可以做到的工具混合在一起并发布给其他人使用。
I needed to do this as well, but couldn't find a tool. Migrating by hand dozens of log4j.properties was not a palatable option. So, I bashed together a tool that can do it and released it for others to use.
http://code.google.com/p/log4j-properties-converter/
它有点粗糙,但我为它提供了log4j属性的技巧,所以任何问题都会在问题跟踪器上记录它们。希望你觉得它很有用。
It's a bit rough but did the trick for the log4j properties I gave it, so any problems log them on the issue tracker. Hope you find it useful.
这篇关于将log4j.properties转换为log4j.xml的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!