我想替换日志中的一些子字符串。使用拥有专有日志功能的JBOSS 6。在jboss中设置替换过滤器6日志记录
例如这样的:
<password>myoutstandingpassword</password>
到
<password>xxxxxxxxxxxxxxxxxxxxx</password>
据我能够通过使用的jboss-logging.xml过滤器来过滤日志中这样的行。
<filter>
<not><match pattern="password"/></not>
</filter>
该过滤器放置在日志处理程序。这完全删除了该行。
但如何删除只有一个子串我不知道。找不到文档。搜索源代码相当耗费。
注意:应该可以在JBOSS AS 6中使用Log4j - http://www.mastertheboss.com/jboss-log/using-log4j-with-jboss-6。在Log4j中,替换可能会完成。我喜欢在没有这个的情况下实施更换。