I have added an ability to control log level for loggers in runtime
(through console so far). But I find a problem with filtering done by
CoronaLogService.
The control is performed at Log4j level. There is one logger per
plugin. They are organized in hierarhical nature - if you set for
instance DEBUG level for "org.eclipse.corona" it is also applied to all
"org.eclipse.corona.*" plugins, unless some plugin has the value
overriden.
An example:
osgi> clInfo
Default level: DEBUG
Active loggers (format: "logger_name[level;effective level]"):
org.eclipse.corona[INFO;INFO]
org.eclipse.corona.container.project.services[null;INFO]
org.eclipse.corona.container.project.ui[DEBUG;DEBUG]
org.eclipse.corona.tests[TEST;TEST]
osgi> clSetLevel org.eclipse.corona DEBUG
Old level: INFO
New level: DEBUG
New effective level: INFO
osgi> clInfo
Default level: DEBUG
Active loggers (format: "logger_name[level;effective level]"):
org.eclipse.corona[DEBUG;DEBUG]
org.eclipse.corona.container.project.services[null;DEBUG]
org.eclipse.corona.container.project.ui[DEBUG;DEBUG]
org.eclipse.corona.tests[TEST;TEST]
Now, I would expect that both org.eclipse.corona and org.eclipse.corona.container.project.services
will print debug information. But, the CoronaLogService filters all
debug information unless there is a debug option set in Eclipse
options.
I can change the debug option for org.eclipse.corona but I
won't be able to do it for any sublogger. I find fallowing possibilites:
- Do not make the debug filtering in CoronaLogService. Leave the
filtering to Log4J.
- Modify CoronaLogService so that it write debug if either there is
debug Eclise setting for plugin or the Log4J logger has effective log
level set to DEBUG; this causes a dependency between CoronaLogService
and Log4J - don't like it.
- Allow debug records in CoronaLogService only for the plugin whose
logger was set to be DEBUG; no DEBUG cascading.
Any preferences?
Marcin
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.
|