I am in the process of migrating my application from log4j 1.2 to log4j2-2.8.1 version. Following is the existing 1.x configuration in log4j.properties file.
log4j.appender.JSERRORFILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.JSERRORFILE.File=${log4j.loglocation}/jserror.log
log4j.appender.JSERRORFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.JSERRORFILE.layout.ConversionPattern=%d %-5p %c - %m%n
log4j.logger.com.app.JavascriptLogger=ERROR,JSERRORFILE
log4j.additivity.com.app.JavascriptLogger=false
Converted this to equivalent xml configuration log4j2.xml :
<RollingFile name="JSERRORFILE" fileName="${log-path}/jserror.log">
<PatternLayout pattern="%d %-5p %c - %m%n" />
</RollingFile>
<Logger name="com.app.JavascriptLogger" level="ERROR" additivity="false">
<AppenderRef ref="JSERRORFILE"/>
</Logger>
After conversion,I keep getting the following error :
org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element RollingFile are invalid
Any help would be appreciated.