Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Logging and tracing in e4

Hi,

the wiki currently saw that you can get a log via:
return (LogService) fEclipseContext.get(LogService.class.getName());

The class LogService does not exists in the current version of e4. I believe this should be changed to (at least this works).
Logger log= (Logger) fEclipseContext .get(Logger.class.getName());

If there are not objections I change the wiki.

Best regards, Lars


2010/1/22 Boris Bokowski <Boris_Bokowski@xxxxxxxxxx>

Hi Ed,

Nothing is set in stone at all. I originally created org.eclipse.e4.core.services.Logger in the hope that someone would come along and pick up this work area. Congratulations, you are the one! ;-)

The only thing I care about is that we end up with something that is easy to use and understand, and that we don't mix client-facing API with the API needed for logging service providers. Otherwise, I am very flexible. The reason for it being a class instead of an interface was that if you want to be able to evolve the API at all, you better use an abstract class instead of an interface.

I would suggest that we continue the discussion on bug 269310 - the cc list on that bug has a number of people interested in the topic.

Boris

Inactive hide details for "Bartsch, Eduard" ---01/22/2010 11:49:09 AM---Hi everyone. I would like to start a discussion how we "Bartsch, Eduard" ---01/22/2010 11:49:09 AM---Hi everyone. I would like to start a discussion how we can progress on logging and tracing topic in


From:

"Bartsch, Eduard" <eduard.bartsch@xxxxxxx>

To:

"e4-dev@xxxxxxxxxxx" <e4-dev@xxxxxxxxxxx>

Date:

01/22/2010 11:49 AM

Subject:

[e4-dev] Logging and tracing in e4

Sent by:

e4-dev-bounces@xxxxxxxxxxx




Hi everyone.

I would like to start a discussion how we can progress on logging and tracing topic in e4 and also offer help to move the implementation forward.

I have checked the wiki page
http://wiki.eclipse.org/E4/EAS/Logging_and_Tracing. It suggests using the org.eclipse.e4.core.services.Logger as an API for logging and says nothing about tracing.

So, I have played around with org.eclipse.e4.core.services.Logger.

There are some aspects that I liked. The logger can be retrieved manually via EclipseContext as well as automatically via dependency injection. It provides some useful methods that do format-based argument substitution (e.g. public void error(String format, Object[] args) ).

I also have some questions and comments. I don't know the plans w.r.t. to logging/tracing so, please, excuse me if I am pointing to things that are already well known and are about to be addressed.

Here are my questions and comments:

The e4 Logger class is not documented (almost no javadoc or other comments). Are there plans to change it before 1.0 release?

The e4 Logger is an abstract class that provides some implementations and not an interface. Any reason for that?

The e4 Logger uses DebugTrace service for writing traces. But all traces are written using org.eclipse.e4.ui.workbench as bundle name and null (mapped to /debug) as debug option. The method isTraceEnabled (of WorkbenchLogger) always returns false so that it has to be ignored so far. The method trace() bravely traces everything into DebugTrace ignoring the debug options settings. Since the calls to DebugTrace are wrapped by Logger class, the information in the trace file about class name and method (as well as about plug-in name and debug option, see above) is useless. Since the debug option is always null, the abilities to enable/disable tracing in a fine-granular way provided by DebugOptions are not used/ignored.  

I haven't yet made my thoughts about the logging part of the Logger class. I will provide them later during discussion.

Best regards,
Ed

Eduard Bartsch
Development Architect
SAP AG
Dietmar-Hopp-Allee 16
69190 Walldorf, Germany
T +49 6227 7-47474
E eduard.bartsch@xxxxxxx
www.sap.com

Pflichtangaben/Mandatory Disclosure Statements:
http://www.sap.com/company/legal/impressum.epx

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.

This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.



_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev



_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev




--
Lars
http://www.vogella.de - Tutorials about Java, Eclipse and Web programming
http://www.twitter.com/vogella - Lars on Twitter

GIF image

GIF image


Back to the top