I looked on the web and could not fing an easy to follow guide to enable Log4j2 for Google App Engine. Being new to this feature.. I found 3 main files that are probably relevent.
1) appengine-web.xml 2) log4j.properties 3) log4j2.xml
My Log4j.properties is shown below: (this has been included in Web-Inf)
log4j.appender.toFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.toFile.File=./log/logfile.log
log4j.appender.toFile.DatePattern='.'
log4j.appender.toFile.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=% %-5p [%t] - %c.%M - %m%n
I added the following to the appengine-web.xml
<!-- Configure apache Log4J Logging -->
<system-properties>
<property name="org.apache.logging.log4j.config.file" value="WEB- INF/log4j.properties"/>
</system-properties>
While runng the Java application, I get the error.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
My intentions were to log the entries into a file. Any pointers on where I can find an example to follow specifically for Google App Engine.