Edyta:
I haven’t look at the implementation
in detail (its messy looking a patch file). It seems like it should have
been written to log to the osgi logging interface and then Corona’s log
listener would pick it up and process it like the rest of our logging. If
the osgi logging wasn’t used is there a technical reason why?
The problem is with an access to the
required bundle context inside ILogListener. By required bundle context I ment
the context of bundle-log-author. The bundle context is needed for retrieval
reference to osgi log service (see start method of CoronaLogService):
public void
start(BundleContext context) {
Object obj;
/**
* initialize our use of the OSGi logging service
*/
this.srvTrackerLogService = new ServiceTracker(context,
LogService.class.getName(), null);
this.srvTrackerLogService.open();
obj = this.srvTrackerLogService.getService();
if ((obj != null) && (obj instanceof LogService)) {
this.logService = (LogService)
obj;
}
...
We have context inside Activators and we
can assign it to public static variable – that solves one problem.
However we don’t have information
inside ILogListener about log author – we have only information that it
was logged by ecore plugin and not by org.eclipse.corona.container.model
calling EcorePlugin.INSTANCE.log…
Edyta
From: Kalka, Edyta
Sent: Tuesday, September 19, 2006
5:44 AM
To: Jaworowski, Piotr; Everitt,
Glenn
Cc: O'Flynn,
Dennis; Hawkins, Joel;
Wright, Jim; Okraszewski,
Marcin; Kaczmarek, Pawel
Subject: RE: [corona-dev] List of
Logging Tasks
Added listener converts platform log
message directly to log4j event.
Thus, I have the following question:
isn’t more flexible solution writing to osgi log service and not directly
to log4j from ILogListener instance?
But another issue is if we are able to
write from ILogListener instance to osgi log service – to retrieve
reference to this log service, bundle context (context of log author) is required.
Is there a way to access such context
inside ILogListener?
Another comment: plugin name passed to
ILogListener instance is the name of ecore plugin and not the name of
plugin-log-author. In such case we can expect having all logs loged through ecore
plugin without a way of recognizing the real log author.
I did not commit this patch yet –
please give your opinions.
Edyta
From: Jaworowski,
Piotr
Sent: 18 września 2006 15:44
To: Everitt, Glenn; Kalka, Edyta
Cc: O'Flynn,
Dennis; Hawkins, Joel;
Wright, Jim; Okraszewski,
Marcin; Kaczmarek, Pawel
Subject: RE: [corona-dev] List of
Logging Tasks
Hi,
Ok, I’ll not add any more comments to commented comments ;-).
As an attachment you can find a patch for org.eclipse.corona.logger.log4j
plug-in, which enables logging of EcorePlugin to the same output as
CoronaService. (It can be configured in log4j.properties ofcourse.)
Cheers,
Piotr.
From: Everitt, Glenn
Sent: Monday, September 18, 2006
2:29 PM
To: Kalka,
Edyta
Cc: O'Flynn,
Dennis; Hawkins, Joel;
Wright, Jim; Jaworowski, Piotr; Okraszewski, Marcin; Kaczmarek,
Pawel
Subject: RE: [corona-dev] List of
Logging Tasks
See my comments on
your comments on my comments below.
From: Kalka, Edyta
Sent: Monday, September 18, 2006
4:16 AM
To: Everitt, Glenn
Cc: O'Flynn,
Dennis; Hawkins, Joel;
Wright, Jim; Jaworowski, Piotr; Okraszewski, Marcin; Kaczmarek,
Pawel
Subject: RE: [corona-dev] List of
Logging Tasks
From: Everitt, Glenn
Sent: 15 września 2006 20:31
To: Kalka,
Edyta
Cc: O'Flynn,
Dennis; Hawkins, Joel;
Wright, Jim; Jaworowski, Piotr; Okraszewski, Marcin; Kaczmarek,
Pawel
Subject: RE: [corona-dev] List of
Logging Tasks
Edyta:
Could we have Piotr determine how to have
EcorePlugin logging output put into the same log files used by the
CoronaLogService?
Yes. I suppose adding new ILogListener
could be a solution here.
Good, does it make
sense for Piotr to work on this?
Could we also have Piotr determine how to
have output from Corona
test classes written to a log specifically for test output?
Adding new appender and
‘org.eclipse.corona.test‘ logger wouldn’t be enough?
What I wanted was a
way to put only output specific to test results to log file. It seems
like we need another log level like TEST to the existing Levels of ERROR,
WARNING, INFO, DEBUG. How hard would that be?
Edyta
I know you did a great deal of work on the
logging but, we need a task for Piotr that can be easily written as a
patch. It seems that the fewer files involved in a patch the better.
You, Dennis and I will continue will the
adding logging statements. After the first pass at logging statements
then you and I will do the package renaming. Next everyone will do more
javadoc.
From: Kalka, Edyta
Sent: Friday, September 15, 2006
7:24 AM
To: Everitt, Glenn
Cc: O'Flynn,
Dennis; Hawkins, Joel;
Wright, Jim; Jaworowski,
Piotr; Okraszewski, Marcin;
Kaczmarek, Pawel
Subject: RE: [corona-dev] List of
Logging Tasks
Glenn,
I have questions concerning adding
headers, cleaning logging etc.
How are we going to split work here?
Should I start from the beginning of list
and add: missing headers (event if I’m not the author of the class), log
service initialization to activators not using it etc.?
Edyta
From: corona-dev-bounces@xxxxxxxxxxx [mailto:corona-dev-bounces@xxxxxxxxxxx] On Behalf Of Kalka,
Edyta
Sent: 15 września 2006 12:07
To: Corona
development
Subject: RE: [corona-dev] List of
Logging Tasks
In case of EMF/SDO generated code such
sample log call can be found: EcorePlugin.INSTANCE.log(exception) – which wraps log call on
org.eclipse.core.runtime.ILog.
Edyta
From: corona-dev-bounces@xxxxxxxxxxx [mailto:corona-dev-bounces@xxxxxxxxxxx] On Behalf Of Everitt, Glenn
Sent: 14 września 2006 20:59
To: Corona
development
Subject: [corona-dev] List of
Logging Tasks
I went through all of the plugins that I believe are used
and looked to see if the CoronaLogService was being used by looking in the
plugin’s Activator. If I found the CoronaLogService being
instantiated I checked to see if it was consistently used. I don’t
know how to use the CoronaLogService in plugins without Activators. We
have some plugins that are used as libraries, but I think they still have
behavior that needs logged. We need to figure this part out. I
think we may want to use a different Logging Service for our test
plugins. Currently none of the test plugins are doing any logging just
System.out…
The conclusion is we have some work to do. What I
found is below we should clean logging up before we change any more package
names because I don’t want to grind through all of the plugins and
create this list again
org.eclipse.corona – CoronaLogService found but needs
work
org.eclipse.corona.client.collaboration.event –
missing
org.eclipse.corona.client.collaboration.ui – missing
org.eclipse.corona.client.ecf – CoronaLogService found
org.eclipse.corona.client.project.builder – found
org.eclipse.corona.client.project.event – missing
org.eclipse.corona.client.project.ui – missing
org.eclipse.corona.common.collaboration –
CoronaLogService found
org.eclipse.corona.common.ecf – no Activator –
how do we access the Logger service
org.eclipse.corona.common.project – CoronaLogService
found but not used
org.eclipse.corona.container.manager –
CoronaLogService found but needs more work
org.eclipse.corona.model.container – missing but
generated code, find out if EMF/SDO has another log / debug approach, no
Activator
org.eclipse.corona.model.container.edit - missing but
generated code, find out if EMF/SDO has another log / debug approach, no
Activator
org.eclipse.corona.model.container.editor - missing but
generated code, find out if EMF/SDO has another log / debug approach, no
Activator
org.eclipse.corona.model.container.project - missing but generated
code, find out if EMF/SDO has another log / debug approach, no Activator
org.eclipse.corona.container.project.edit - missing but
generated code, find out if EMF/SDO has another log / debug approach, no
Activator
org.eclipse.corona.container.project.editor - missing but
generated code, find out if EMF/SDO has another log / debug approach, no
Activator
org.eclipse.corona.project.container.explorer – found
but not used in package org.eclipse.corona.project.container.explorer.actions
or views
org.eclipse.corona.project.container.view –
CoronaLogService found but needs some work
org.eclipse.corona.repository – CoronaLogService found
not bad
org.eclipse.corona.repository.adapter.team – no
Activator – how do we access the Logger service
org.eclipse.corona.repository.adapter.wp –
CoronaLogService found but not used
org.eclipse.corona.repository.dbms.team –
CoronaLogService found but not used
org.eclipse.corona.server.derby – CoronaLogService
found
org.eclipse.corona.server.ecf – CoronaLogService found
org.eclipse.corona.server.repository.team –
CoronaLogService found
org.eclipse.corona.server.test.container.project – not
found, this is a test class does it make sense to log to CoronaLogService or a
TestLogService?
org.eclipse.corona.test – not found, this is a test
class does it make sense to log to CoronaLogService or a TestLogService?
org.eclipse.corona.test.server.ecf – not found, this
is a test class does it make sense to log to CoronaLogService or a
TestLogService?
org.eclipse.corona.ui.tools – missing
test.eclipse.corona – not found, this is a test class
does it make sense to log to CoronaLogService or a TestLogService?
test.eclipse.corona.common.project – not found, this
is a test class does it make sense to log to CoronaLogService or a
TestLogService?
test.eclipse.corona.repository – not found, this is a
test class does it make sense to log to CoronaLogService or a TestLogService?
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.
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.