2
%replace{%replace{%replace{%msg}{regex1}{substitution1}}{regex2}{substitution2}}{regex3}{substitution3}

我正在尝试从我的日志中替换正则表达式模式并且它工作正常。
何时%replace最多使用两次,但是当我尝试替换第三个模式时,它停止工作,它只是%replace在日志输出中打印“”。

4

1 回答 1

0

这对我有用。

<Pattern>"%d{yyyy-MM-dd HH:mm:ss} - %replace{%replace{%replace{%msg}{reg1}{sub1}}{reg2}{sub2}}{reg3}{sub3}%n"</Pattern>
于 2020-06-09T15:09:38.347 回答