Class IfNot
java.lang.Object
org.apache.logging.log4j.core.appender.rolling.action.IfNot
- All Implemented Interfaces:
PathCondition
@Plugin(name="IfNot",
category="Core",
printObject=true)
public final class IfNot
extends Object
implements PathCondition
Wrapper
PathCondition that accepts objects that are rejected by the wrapped component filter.-
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.appender.rolling.action.PathCondition
EMPTY_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(Path baseDir, Path relativePath, BasicFileAttributes attrs) Returnstrueif the specified candidate path should be deleted,falseotherwise.voidInvoked before a new file tree walk is started.static IfNotcreateNotCondition(PathCondition condition) Create an IfNot PathCondition.toString()
-
Method Details
-
getWrappedFilter
-
accept
Description copied from interface:PathConditionReturnstrueif the specified candidate path should be deleted,falseotherwise.- Specified by:
acceptin interfacePathCondition- Parameters:
baseDir- the directory from where to start scanning for deletion candidate filesrelativePath- the candidate for deletion. This path is relative to the baseDir.attrs- attributes of the candidate path- Returns:
- whether the candidate path should be deleted
-
beforeFileTreeWalk
public void beforeFileTreeWalk()Description copied from interface:PathConditionInvoked before a new file tree walk is started. Stateful PathConditions can reset their state when this method is called.- Specified by:
beforeFileTreeWalkin interfacePathCondition
-
createNotCondition
@PluginFactory public static IfNot createNotCondition(@PluginElement("PathConditions") @Required(message="No condition provided for IfNot") PathCondition condition) Create an IfNot PathCondition.- Parameters:
condition- The condition to negate.- Returns:
- An IfNot PathCondition.
-
toString
-