How to customize log4j logging? [message #1758859] |
Mon, 03 April 2017 17:40  |
Eclipse User |
|
|
|
I want to customize log4j logging in xtext regarding to https://eclipse.org/Xtext/documentation/302_configuration.html#logging but no success. It already does not work with the Eclipse standard xtext project made by the wizard. I have copied the log4j.properties file below to org.xtext.example.mydsl/src, add a validation method which creates "division by zero" exceptions to trigger logger output, rebuild the project and start the mydsl plugin in debug mode. I expect to see a log.out file but nothing. Due to the validation method I see log4j output in Eclipse's error view. Can someone please tell me what I do wrong?
# Define the root logger with appender file
log4j.rootLogger = DEBUG, FILE
# Define the file appender
log4j.appender.FILE=org.apache.log4j.FileAppender
# Set the name of the file
log4j.appender.FILE.File=${log}/log.out
# Set the immediate flush to true (default)
log4j.appender.FILE.ImmediateFlush=true
# Set the threshold to debug mode
log4j.appender.FILE.Threshold=debug
# Set the append to false, overwrite
log4j.appender.FILE.Append=false
# Define the layout for file appender
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.conversionPattern=%m%n
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05639 seconds