[ 
https://issues.apache.org/jira/browse/LOG4J2-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401629#comment-16401629
 ] 

Rehel commented on LOG4J2-2282:
-------------------------------

Here is my integrations.


{code:java}
slf4j-api-1.7.25.jar
log4j-api-2.10.0.jar
log4j-core-2.10.0.jar
log4j-slf4j-impl-2.10.0.jar{code}

I guess it was what you wanted. Here is output.


{code:java}
2018-03-16 12:09:08,657 main DEBUG Initializing configuration 
XmlConfiguration[location=/mnt/94E4DF48E4DF2B6E/JME/rhl/build/classes/log4j2.xml]
2018-03-16 12:09:08,667 main DEBUG Installed 2 script engines
2018-03-16 12:09:09,209 main DEBUG Oracle Nashorn version: 1.8.0_152, language: 
ECMAScript, threading: Not Thread Safe, compile: true, names: [nashorn, 
Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], factory 
class: jdk.nashorn.api.scripting.NashornScriptEngineFactory
2018-03-16 12:09:09,226 main DEBUG Groovy Scripting Engine version: 2.0, 
language: Groovy, threading: MULTITHREADED, compile: true, names: [groovy, 
Groovy], factory class: org.codehaus.groovy.jsr223.GroovyScriptEngineFactory
2018-03-16 12:09:09,228 main DEBUG PluginManager 'Core' found 116 plugins
2018-03-16 12:09:09,229 main DEBUG PluginManager 'Level' found 0 plugins
2018-03-16 12:09:09,237 main DEBUG PluginManager 'Lookup' found 13 plugins
2018-03-16 12:09:09,239 main DEBUG Building Plugin[name=layout, 
class=org.apache.logging.log4j.core.layout.PatternLayout].
2018-03-16 12:09:09,259 main TRACE TypeConverterRegistry initializing.
2018-03-16 12:09:09,264 main DEBUG PluginManager 'TypeConverter' found 26 
plugins
2018-03-16 12:09:09,280 main DEBUG PatternLayout$Builder(pattern="%m%n", 
PatternSelector=null, Configuration(rhl), Replace=null, charset="null", 
alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", 
header="null", footer="null")
2018-03-16 12:09:09,281 main DEBUG PluginManager 'Converter' found 42 plugins
2018-03-16 12:09:09,282 main DEBUG Building Plugin[name=appender, 
class=org.apache.logging.log4j.core.appender.ConsoleAppender].
2018-03-16 12:09:09,301 main DEBUG ConsoleAppender$Builder(target="SYSTEM_OUT", 
follow="null", direct="null", bufferedIo="null", bufferSize="null", 
immediateFlush="null", ignoreExceptions="null", PatternLayout(%m%n), 
name="STDOUT", Configuration(rhl), Filter=null)
2018-03-16 12:09:09,305 main DEBUG Starting OutputStreamManager 
SYSTEM_OUT.false.false
2018-03-16 12:09:09,305 main DEBUG Building Plugin[name=layout, 
class=org.apache.logging.log4j.core.layout.PatternLayout].
2018-03-16 12:09:09,310 main DEBUG PatternLayout$Builder(pattern="%d %p %c{1.} 
[%t] %m%n", PatternSelector=null, Configuration(rhl), Replace=null, 
charset="null", alwaysWriteExceptions="null", disableAnsi="null", 
noConsoleNoAnsi="null", header="null", footer="null")
2018-03-16 12:09:09,334 main DEBUG Building 
Plugin[name=TimeBasedTriggeringPolicy, 
class=org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy].
2018-03-16 12:09:09,343 main DEBUG 
TimeBasedTriggeringPolicy$Builder(interval="1", modulate="true", 
maxRandomDelay="null")
2018-03-16 12:09:09,343 main DEBUG Building 
Plugin[name=SizeBasedTriggeringPolicy, 
class=org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy].
2018-03-16 12:09:09,353 main DEBUG createPolicy(size="50MB")
2018-03-16 12:09:09,354 main DEBUG Building Plugin[name=Policies, 
class=org.apache.logging.log4j.core.appender.rolling.CompositeTriggeringPolicy].
2018-03-16 12:09:09,359 main DEBUG 
createPolicy(={TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, 
modulate=true), SizeBasedTriggeringPolicy(size=52428800)})
2018-03-16 12:09:09,360 main DEBUG Building Plugin[name=Delete, 
class=org.apache.logging.log4j.core.appender.rolling.action.DeleteAction].
2018-03-16 12:09:09,363 main ERROR Delete contains invalid attributes 
"IfFileName", "IfLastModified"
2018-03-16 12:09:09,363 main DEBUG createDeleteAction(basePath="logs/", 
followLinks="false", maxDepth="2", testMode="false", PathSorter=null, ={}, 
ScriptCondition=null, Configuration(rhl))
2018-03-16 12:09:09,364 main ERROR Missing Delete conditions: unconditional 
Delete not supported
2018-03-16 12:09:09,364 main ERROR Unable to invoke factory method in class 
org.apache.logging.log4j.core.appender.rolling.action.DeleteAction for element 
Delete: java.lang.IllegalArgumentException: Unconditional Delete not supported 
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at 
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:958)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:898)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:513)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:237)
    at 
org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:249)
    at 
org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
    at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
    at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
    at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
    at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
    at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
    at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
    at 
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:122)
    at 
org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
    at 
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
    at 
org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at rhl.Main.<clinit>(Main.java:22)
Caused by: java.lang.IllegalArgumentException: Unconditional Delete not 
supported
    at 
org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.<init>(DeleteAction.java:71)
    at 
org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.createDeleteAction(DeleteAction.java:212)
    ... 27 more

2018-03-16 12:09:09,371 main DEBUG Building 
Plugin[name=DefaultRolloverStrategy, 
class=org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy].
2018-03-16 12:09:09,378 main ERROR Null object returned for Delete in 
DefaultRolloverStrategy.
2018-03-16 12:09:09,380 main DEBUG DefaultRolloverStrategy$Builder(max="5", 
min="null", fileIndex="null", compressionLevel="null", ={}, 
stopCustomActionsOnError="null", tempCompressedFilePattern="null", 
Configuration(rhl))
2018-03-16 12:09:09,381 main DEBUG Building Plugin[name=appender, 
class=org.apache.logging.log4j.core.appender.RollingFileAppender].
2018-03-16 12:09:09,390 main DEBUG 
RollingFileAppender$Builder(fileName="logs/test.log", 
filePattern="logs/test-%d{dd-MM-yy hh-mm}-%i.log.gz", append="null", 
locking="null", 
Policies(CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0,
 interval=1, modulate=true), SizeBasedTriggeringPolicy(size=52428800)])), 
DefaultRolloverStrategy(DefaultRolloverStrategy(min=1, max=5, useMax=true)), 
advertise="null", advertiseUri="null", createOnDemand="null", 
filePermissions="null", fileOwner="null", fileGroup="null", bufferedIo="null", 
bufferSize="null", immediateFlush="null", ignoreExceptions="null", 
PatternLayout(%d %p %c{1.} [%t] %m%n), name="RollingFile", Configuration(rhl), 
Filter=null)
2018-03-16 12:09:09,399 main TRACE New file 'logs/test.log' created = false
2018-03-16 12:09:09,399 main DEBUG Starting RollingFileManager logs/test.log
2018-03-16 12:09:09,404 main DEBUG PluginManager 'FileConverter' found 2 plugins
2018-03-16 12:09:09,422 main DEBUG Setting prev file time to 
2018-03-16T12:07:46.000+0300
2018-03-16 12:09:09,430 main DEBUG Initializing triggering policy 
CompositeTriggeringPolicy(policies=[TimeBasedTriggeringPolicy(nextRolloverMillis=0,
 interval=1, modulate=true), SizeBasedTriggeringPolicy(size=52428800)])
2018-03-16 12:09:09,430 main TRACE PatternProcessor.getNextTime returning 
2018/03/16-12:08:00.000, nextFileTime=2018/03/16-12:07:00.000, 
prevFileTime=1970/01/01-02:00:00.000, current=2018/03/16-12:09:09.430, 
freq=EVERY_MINUTE
2018-03-16 12:09:09,431 main TRACE PatternProcessor.getNextTime returning 
2018/03/16-12:08:00.000, nextFileTime=2018/03/16-12:07:00.000, 
prevFileTime=2018/03/16-12:07:00.000, current=2018/03/16-12:09:09.431, 
freq=EVERY_MINUTE
2018-03-16 12:09:09,432 main DEBUG Building Plugin[name=appenders, 
class=org.apache.logging.log4j.core.config.AppendersPlugin].
2018-03-16 12:09:09,442 main DEBUG createAppenders(={STDOUT, RollingFile})
2018-03-16 12:09:09,443 main DEBUG Building Plugin[name=AppenderRef, 
class=org.apache.logging.log4j.core.config.AppenderRef].
2018-03-16 12:09:09,444 main DEBUG createAppenderRef(ref="RollingFile", 
level="null", Filter=null)
2018-03-16 12:09:09,444 main DEBUG Building Plugin[name=AppenderRef, 
class=org.apache.logging.log4j.core.config.AppenderRef].
2018-03-16 12:09:09,451 main DEBUG createAppenderRef(ref="STDOUT", 
level="null", Filter=null)
2018-03-16 12:09:09,451 main DEBUG Building Plugin[name=root, 
class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
2018-03-16 12:09:09,467 main DEBUG createLogger(additivity="null", 
level="FATAL", includeLocation="null", ={RollingFile, STDOUT}, ={}, 
Configuration(rhl), Filter=null)
2018-03-16 12:09:09,480 main DEBUG Building Plugin[name=loggers, 
class=org.apache.logging.log4j.core.config.LoggersPlugin].
2018-03-16 12:09:09,490 main DEBUG createLoggers(={root})
2018-03-16 12:09:09,490 main DEBUG Configuration 
XmlConfiguration[location=/mnt/94E4DF48E4DF2B6E/JME/rhl/build/classes/log4j2.xml]
 initialized
2018-03-16 12:09:09,491 main DEBUG Starting configuration 
XmlConfiguration[location=/mnt/94E4DF48E4DF2B6E/JME/rhl/build/classes/log4j2.xml]
2018-03-16 12:09:09,491 main DEBUG Started configuration 
XmlConfiguration[location=/mnt/94E4DF48E4DF2B6E/JME/rhl/build/classes/log4j2.xml]
 OK.
2018-03-16 12:09:09,492 main TRACE Stopping 
org.apache.logging.log4j.core.config.DefaultConfiguration@7960847b...
2018-03-16 12:09:09,493 main TRACE DefaultConfiguration notified 1 
ReliabilityStrategies that config will be stopped.
2018-03-16 12:09:09,495 main TRACE DefaultConfiguration stopping root 
LoggerConfig.
2018-03-16 12:09:09,496 main TRACE DefaultConfiguration notifying 
ReliabilityStrategies that appenders will be stopped.
2018-03-16 12:09:09,496 main TRACE DefaultConfiguration stopping remaining 
Appenders.
2018-03-16 12:09:09,497 main DEBUG Shutting down OutputStreamManager 
SYSTEM_OUT.false.false-1
2018-03-16 12:09:09,497 main DEBUG Shut down OutputStreamManager 
SYSTEM_OUT.false.false-1, all resources released: true
2018-03-16 12:09:09,497 main DEBUG Appender DefaultConsole-1 stopped with 
status true
2018-03-16 12:09:09,498 main TRACE DefaultConfiguration stopped 1 remaining 
Appenders.
2018-03-16 12:09:09,498 main TRACE DefaultConfiguration cleaning Appenders from 
1 LoggerConfigs.
2018-03-16 12:09:09,499 main DEBUG Stopped 
org.apache.logging.log4j.core.config.DefaultConfiguration@7960847b OK
2018-03-16 12:09:09,687 main TRACE Reregistering MBeans after reconfigure. 
Selector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector@71e9ddb4
2018-03-16 12:09:09,690 main TRACE Reregistering context (1/1): '5acf9800' 
org.apache.logging.log4j.core.LoggerContext@394df057
2018-03-16 12:09:09,693 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800'
2018-03-16 12:09:09,695 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800,component=StatusLogger'
2018-03-16 12:09:09,700 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800,component=ContextSelector'
2018-03-16 12:09:09,701 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800,component=Loggers,name=*'
2018-03-16 12:09:09,705 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800,component=Appenders,name=*'
2018-03-16 12:09:09,706 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800,component=AsyncAppenders,name=*'
2018-03-16 12:09:09,708 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800,component=AsyncLoggerRingBuffer'
2018-03-16 12:09:09,710 main TRACE Unregistering but no MBeans found matching 
'org.apache.logging.log4j2:type=5acf9800,component=Loggers,name=*,subtype=RingBuffer'
2018-03-16 12:09:09,721 main DEBUG Registering MBean 
org.apache.logging.log4j2:type=5acf9800
2018-03-16 12:09:09,727 main DEBUG Registering MBean 
org.apache.logging.log4j2:type=5acf9800,component=StatusLogger
2018-03-16 12:09:09,732 main DEBUG Registering MBean 
org.apache.logging.log4j2:type=5acf9800,component=ContextSelector
2018-03-16 12:09:09,740 main DEBUG Registering MBean 
org.apache.logging.log4j2:type=5acf9800,component=Loggers,name=
2018-03-16 12:09:09,744 main DEBUG Registering MBean 
org.apache.logging.log4j2:type=5acf9800,component=Appenders,name=STDOUT
2018-03-16 12:09:09,745 main DEBUG Registering MBean 
org.apache.logging.log4j2:type=5acf9800,component=Appenders,name=RollingFile
2018-03-16 12:09:09,750 main TRACE Using default SystemClock for timestamps.
2018-03-16 12:09:09,751 main TRACE Using DummyNanoClock for nanosecond 
timestamps.
2018-03-16 12:09:09,754 main DEBUG Reconfiguration complete for 
context[name=5acf9800] at URI 
/mnt/94E4DF48E4DF2B6E/JME/rhl/build/classes/log4j2.xml 
(org.apache.logging.log4j.core.LoggerContext@394df057) with optional 
ClassLoader: null
2018-03-16 12:09:09,755 main DEBUG Shutdown hook enabled. Registering a new one.
2018-03-16 12:09:09,758 main DEBUG LoggerContext[name=5acf9800, 
org.apache.logging.log4j.core.LoggerContext@394df057] started OK.
2018-03-16 12:09:14,917 pool-1-thread-1 DEBUG Stopping 
LoggerContext[name=5acf9800, 
org.apache.logging.log4j.core.LoggerContext@394df057]
2018-03-16 12:09:14,918 pool-1-thread-1 DEBUG Stopping 
LoggerContext[name=5acf9800, 
org.apache.logging.log4j.core.LoggerContext@394df057]...
2018-03-16 12:09:14,919 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=5acf9800]
2018-03-16 12:09:14,920 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=5acf9800,component=StatusLogger]
2018-03-16 12:09:14,920 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=5acf9800,component=ContextSelector]
2018-03-16 12:09:14,923 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
[org.apache.logging.log4j2:type=5acf9800,component=Loggers,name=]
2018-03-16 12:09:14,924 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
[org.apache.logging.log4j2:type=5acf9800,component=Appenders,name=STDOUT, 
org.apache.logging.log4j2:type=5acf9800,component=Appenders,name=RollingFile]
2018-03-16 12:09:14,925 pool-1-thread-1 TRACE Unregistering but no MBeans found 
matching 
'org.apache.logging.log4j2:type=5acf9800,component=AsyncAppenders,name=*'
2018-03-16 12:09:14,927 pool-1-thread-1 TRACE Unregistering but no MBeans found 
matching 
'org.apache.logging.log4j2:type=5acf9800,component=AsyncLoggerRingBuffer'
2018-03-16 12:09:14,928 pool-1-thread-1 TRACE Unregistering but no MBeans found 
matching 
'org.apache.logging.log4j2:type=5acf9800,component=Loggers,name=*,subtype=RingBuffer'
2018-03-16 12:09:14,928 pool-1-thread-1 TRACE Stopping 
XmlConfiguration[location=/mnt/94E4DF48E4DF2B6E/JME/rhl/build/classes/log4j2.xml]...
2018-03-16 12:09:14,930 pool-1-thread-1 TRACE XmlConfiguration notified 2 
ReliabilityStrategies that config will be stopped.
2018-03-16 12:09:14,931 pool-1-thread-1 TRACE XmlConfiguration stopping 1 
LoggerConfigs.
2018-03-16 12:09:14,945 pool-1-thread-1 TRACE XmlConfiguration stopping root 
LoggerConfig.
2018-03-16 12:09:14,946 pool-1-thread-1 TRACE XmlConfiguration notifying 
ReliabilityStrategies that appenders will be stopped.
2018-03-16 12:09:14,947 pool-1-thread-1 TRACE XmlConfiguration stopping 
remaining Appenders.
2018-03-16 12:09:14,949 pool-1-thread-1 DEBUG Shutting down RollingFileManager 
logs/test.log
2018-03-16 12:09:14,952 pool-1-thread-1 DEBUG Shutting down RollingFileManager 
{}logs/test.log
2018-03-16 12:09:14,953 pool-1-thread-1 DEBUG All asynchronous threads have 
terminated
2018-03-16 12:09:14,960 pool-1-thread-1 DEBUG RollingFileManager shutdown 
completed with status true
2018-03-16 12:09:14,960 pool-1-thread-1 DEBUG Shut down RollingFileManager 
logs/test.log, all resources released: true
2018-03-16 12:09:14,961 pool-1-thread-1 DEBUG Appender RollingFile stopped with 
status true
2018-03-16 12:09:14,961 pool-1-thread-1 DEBUG Shutting down OutputStreamManager 
SYSTEM_OUT.false.false
2018-03-16 12:09:14,961 pool-1-thread-1 DEBUG Shut down OutputStreamManager 
SYSTEM_OUT.false.false, all resources released: true
2018-03-16 12:09:14,965 pool-1-thread-1 DEBUG Appender STDOUT stopped with 
status true
2018-03-16 12:09:14,965 pool-1-thread-1 TRACE XmlConfiguration stopped 2 
remaining Appenders.
2018-03-16 12:09:14,965 pool-1-thread-1 TRACE XmlConfiguration cleaning 
Appenders from 2 LoggerConfigs.
2018-03-16 12:09:14,965 pool-1-thread-1 DEBUG Stopped 
XmlConfiguration[location=/mnt/94E4DF48E4DF2B6E/JME/rhl/build/classes/log4j2.xml]
 OK
2018-03-16 12:09:14,966 pool-1-thread-1 DEBUG Stopped 
LoggerContext[name=5acf9800, 
org.apache.logging.log4j.core.LoggerContext@394df057] with status true{code}
 

 

 

> How i delete the old log files with 2.10.0
> ------------------------------------------
>
>                 Key: LOG4J2-2282
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2282
>             Project: Log4j 2
>          Issue Type: Question
>          Components: Core
>    Affects Versions: 2.10.0
>            Reporter: Rehel
>            Priority: Major
>
> Hi i tried to deleted my old log files but I have not been successful. 
> Here is my xml file.
> {code:java}
> <Configuration status="error" name="rhl" packages="">
>     <Appenders>
>         <Console name="STDOUT" target="SYSTEM_OUT">
>             <PatternLayout pattern="%m%n"/>
>         </Console>
>         <RollingFile name="RollingFile" fileName="logs/test.log"
>                 filePattern="logs/test-%d{dd-MM-yy hh-mm}-%i.log.gz">
>             <PatternLayout>
>                 <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
>             </PatternLayout>
>             <Policies>
>                 <TimeBasedTriggeringPolicy interval="1" modulate="true"/>
>                 <SizeBasedTriggeringPolicy size="50MB"/>
>             </Policies>
>             <DefaultRolloverStrategy max="5">
>                 <Delete basePath="logs/" maxDepth="2">
>                     <IfFileName glob="*/test-*.log.gz" />
>                     <IfLastModified age="7d" />
>                 </Delete>
>             </DefaultRolloverStrategy>
>         </RollingFile>
>     </Appenders>
>     <Loggers>
>         <Root level="error">
>             <AppenderRef ref="RollingFile" />
>             <AppenderRef ref="STDOUT"/>
>         </Root>
>     </Loggers>
> </Configuration>{code}
>  
> and here is the console output;
> {code:java}
> 2018-03-16 01:04:25,154 main ERROR Delete contains invalid attributes 
> "IfFileName", "IfLastModified"
> 2018-03-16 01:04:25,156 main ERROR Missing Delete conditions: unconditional 
> Delete not supported
> 2018-03-16 01:04:25,158 main ERROR Unable to invoke factory method in class 
> org.apache.logging.log4j.core.appender.rolling.action.DeleteAction for 
> element Delete: java.lang.IllegalArgumentException: Unconditional Delete not 
> supported java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at 
> org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:958)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:898)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:513)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:237)
>     at 
> org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:249)
>     at 
> org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
>     at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
>     at 
> org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
>     at 
> org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
>     at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
>     at 
> org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
>     at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
>     at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:122)
>     at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
>     at 
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
>     at 
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
>     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
>     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
>     at excuseme.Main.<clinit>(Main.java:22)
> Caused by: java.lang.IllegalArgumentException: Unconditional Delete not 
> supported
>     at 
> org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.<init>(DeleteAction.java:71)
>     at 
> org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.createDeleteAction(DeleteAction.java:212)
>     ... 27 more
> 2018-03-16 01:04:25,161 main ERROR Null object returned for Delete in 
> DefaultRolloverStrategy.
> {code}
> What should i do?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to