Configuring Log4J [message #759520] |
Mon, 28 November 2011 17:15  |
Eclipse User |
|
|
|
Hi all,
I am trying to configure Log4J for Xtext however I couldn't get it working.
Obviously I did something wrong so below you can find the steps that I took.
I created a fragment project in eclipse with the following Manifest:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.my.company.log4j.config
Bundle-SymbolicName: org.my.company.log4j.config
Bundle-Version: 1.0.0.qualifier
Fragment-Host: org.apache.log4j;bundle-version="1.2.15.v201012070815"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
In the source folder I have the following log4j.properties file:
log4j.rootCategory=INFO, S
log4j.logger.org.eclipse.xtext=DEBUG
log4j.appender.S = org.apache.log4j.ConsoleAppender
log4j.appender.S.layout = org.apache.log4j.PatternLayout
log4j.appender.S.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n
I exported the project as a deployable fragment and added the resulting jar file to the classpath of my project. However I do not get any messages in the console.
What is the right way to configure log4J?
Thanks in advance.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07374 seconds