Add plugin factory method.
@@ -20,6 +20,7 @@ package org.apache.logging.log4j.core.appender.rolling;
import org.apache.logging.log4j.core.Core;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.config.plugins.Plugin;
+import org.apache.logging.log4j.core.config.plugins.PluginFactory;
/*
* Never triggers and is handy for edge-cases in tests for example.
@@ -31,6 +32,11 @@ public class NoOpTriggeringPolicy extends AbstractTriggeringPolicy {
public static final NoOpTriggeringPolicy INSTANCE = new NoOpTriggeringPolicy();
+ @PluginFactory
+ public static NoOpTriggeringPolicy createPolicy() {
+ return INSTANCE;
+ }
+
@Override
public void initialize(final RollingFileManager manager) {
// NoOp
