Piotr:
could you update the Junit for
org.eclipse.corona.tests.tools.ui to use the test logs we had talk about?
I think this will be the example others should follow.
Thanks
Glenn Everitt
Here is some history about the test logging stuff you wrote
up.
Hi,
The new appender is implemented and can be found in attachement as patch.
·
LevelRollingFileAppender’s
configuration
New appender extends
RollingFileAppender so it can be configured in the same way as normal
RollingFileAppender with one exception, value LevelToLog
has to be set. The difference in configuration file for this
appender looks as follows:
log4j.appender.test.rolling.file4=org.eclipse.corona.logger.log4j.appenders.LevelRollingFileAppender
log4j.appender.test.rolling.file4.File=C:\\Temp\\edka.test4.log
log4j.appender.test.rolling.file4.MaxFileSize=100KB
log4j.appender.test.rolling.file4.MaxBackupIndex=1
log4j.appender.test.rolling.file4.layout=org.apache.log4j.PatternLayout
log4j.appender.test.rolling.file4.layout.ConversionPattern=[%p] %m%n
log4j.appender.test.rolling.file4.LevelToLog=test#org.eclipse.corona.logger.log4j.levels.TestLevel
Bold line, indicates that file C:\\Temp\\edka.test4.log
will contain ONLY TestLevel logs.
- LevelRollingFileAppender
used with TestLevel:
If you want to use LevelRollingFileAppender to log TestLevel value, and you want to use it with other
appenders, following changes are required.
-
Defining
logger itself:
log4j.logger.org.eclipse.corona.project.container.explorer=test#org.eclipse.corona.logger.log4j.levels.TestLevel,
test.rolling.file3, eclipse.log, test.rolling.file4
-
If you
don’t want other appenders to log [TEST] level change, appenders
configuration as follows:
log4j.appender.test.rolling.file3=org.apache.log4j.RollingFileAppender
<Some other configuration stuff>
log4j.appender.test.rolling.file3.Threshold=DEBUG
The Threshold value
indicates that appender will log all values higher or equal to define Threshold
(in this case DEBUG).
This is more less all new stuff needed for
configuration.
Piotr.
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.