Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Log4j2 configuration

hakdoganDec 5 2012 — edited Dec 7 2012
Hi.

I want to use Log4j2 in my fusion web application. I added the two jar to my fusion web application:

log4j-api-2.0-beta3.jar
log4j-core-2.0-beta3.jar

I created a configuration file named log4j2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
<File name="myAppFile" fileName="logs/myApp.log">
<PatternLayout>
<pattern>%d %p %C{1.} [%t] %m%n</pattern>
</PatternLayout>
</File>
</appenders>
<loggers>
<root level="trace">
<appender-ref ref="myAppFile"/>
</root>
</loggers>
</configuration>

At run time, does not create of the log file.

Which directory should have this file?

My JDev version: 11.1.2.30
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2013
Added on Dec 5 2012
10 comments
3,049 views