How to create custom RewritePolicy in log4j2?
问题 I'm trying to code my own RewritePolicy in Log4j2. The documentation states that : RewritePolicy is an interface that allows implementations to inspect and possibly modify LogEvents before they are passed to Appender. RewritePolicy declares a single method named rewrite that must be implemented. The method is passed the LogEvent and can return the same event or create a new one. Here's my java class : public final class MarkerInjectorRewritePolicy implements RewritePolicy { @Override public