Notepad ++ Log4j模式过滤器

时间:2015-01-22 10:41:50

标签: regex filter log4j notepad++

我有这个日志文件:

<2015-01-22 10:23:51,000> - <DEBUG> - <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> - MyLogClass - Message1
<2015-01-22 10:23:52,000> - <INFO> - <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> - MyLogClass - Message2
<2015-01-22 10:23:53,000> - <ERROR> - <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> - MyLogClass - Message3

我想删除行,以获取此信息:

<2015-01-22 10:23:51,000> Thread: '1' - Message1
<2015-01-22 10:23:52,000> Thread: '2' - Message2
<2015-01-22 10:23:53,000> Thread: '2' - Message3

1 个答案:

答案 0 :(得分:2)

找到:

- .*?\[ACTIVE\] Execute(Thread:\s+'[^']*').*(?=\s-)

替换为:

\1

DEMO