Log4j2 custom filter

后端 未结 1 745
被撕碎了的回忆
被撕碎了的回忆 2021-01-20 02:22

I\'m attempting to implement and configure a custom Filter in Log4J2 - based on ThresholdFilter, but intended to do more. I\'ve seen topics on custom appenders, which follow

1条回答
  •  被撕碎了的回忆
    2021-01-20 02:45

    Can you show your config's first line, the element?

    You can specify to make log4j's internal logging appear on the console, which may help troubleshoot the issue.

    Perhaps log4j has trouble finding your plugin.

    When you compile your plugin a serialized plugin listing file is created. This file contains the name of your plugin and the classname in binary format. If this file is included in the jar containing your plugin class, log4j can find your plugin. Another way to help log4j find your plugin is to specify a packages attribute your config file:

    ...

    For more detail, see this manual page on how the PluginManager tries to locate plugins.

    0 讨论(0)
提交回复
热议问题