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 Lars,

On Fri, Jan 22, 2010 at 1:55 PM, Lars Vogel <lars.vogel@xxxxxxxxxxxxxx> wrote:
> 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.

The LogService is an OSGi interface which comes from the org.eclipse.osgi.services bundle. Of course, if no one has registered the service then 'null' will be returned.

> 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.

Please feel free to append this to the page as it is not clear at the moment that the Logger should be retrieved via the context (or via injection with @Inject private Logger logger;).

Regards,
Remy

----------
Remy Suen
Eclipse Platform/UI Committer
IBM Ottawa
613-356-5162


Back to the top