Hi All,
Example done as Glenn
asked (changed log4j.properties and org.eclipse.corona.tests.tools.ui
plugin).
Unfortunately,
I’ve noticed that our log stuff (appenders and levels) are not working at
all. The problem is that following packages:
*
org.eclipse.corona.logger.log4j.appenders
*
org.eclipse.corona.logger.log4j.levels
were
moved from org.apache.log4j_1.2.13 plugin to org.eclipse.corona.logger.log4j.
This is the reason why classes
located in those packages are not visible for log4j.
For
now I see only one solution for this item, move mentioned packages back to org.apache.log4j_1.2.13
plugin.
Or maybe you have idea how
we should handle this issue? (adding corona.logger to log4j manifest as required
plugin or import package causes cycle problem L).
Piotr,
From:
corona-dev-bounces@xxxxxxxxxxx [mailto:corona-dev-bounces@xxxxxxxxxxx] On Behalf Of Everitt, Glenn
Sent: Thursday, October 12, 2006
3:02 PM
To: Corona development
Subject: [corona-dev] Junit for
org.eclipse.corona.tests.tools.ui
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.
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.