闲话少说,直接上配置示例吧:

1、带正则表达式的,比如排除某个DEBUG开头的日志

processors:
  - drop_event:
      when:
        regexp:
          message: "^DEBUG:"

2、排除还有某个关键字如test的日志

processors:
  - drop_event:
      when:
        contains:
          message: "test"