[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Accessing the log without Activator (extendsPlugin)

Here is the invocation that I use to get ILog without an Activator:

 

Platform.getLog( Platform.getBundle( "..." ) )

 

Thanks,

 

- Konstantin

 

 

 


From: Neil Bartlett
Sent: Wednesday, October 7, 2015 8:50 AM
To: Equinox development mailing list
Subject: Re: [equinox-dev] Accessing the log without Activator (extendsPlugin)

 

 

Looking at the source code, ILog is not an OSGi service but is constructed as a wrapper object around the OSGi LogService. The relevant code is in org.eclipse.core.internal.runtime.InternalPlatform.

 

Do you need the full functionality of an ILog, or is standard OSGi LogService sufficient? If the latter, then you can use a DS component and just inject a reference to the LogService. If you really need ILog then I think you have to go through InternalPlatform.getDefault().getLog().

 

Neil

 

 

> On 7 Oct 2015, at 09:38, Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:

>

> Hi,

>

> in my Activator based on Plugin, I have this nice method:

>

> MyActivator.getDefault().getLog() which is basically Plugin.getLog().

>

> What is the correct way to access the ILog in OSGi without an Activator?

>

> Best regards, Lars

>

> --

> Eclipse Platform UI and e4 project co-lead

> CEO vogella GmbH

>

> Haindaalwisch 17a, 22395 Hamburg

> Amtsgericht Hamburg: HRB 127058

> GeschÃftsfÃhrer: Lars Vogel, Jennifer Nerlich de Vogel

> USt-IdNr.: DE284122352

> Fax (032) 221739404, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com

> _______________________________________________

> equinox-dev mailing list

> equinox-dev@xxxxxxxxxxx

> To change your delivery options, retrieve your password, or unsubscribe from this list, visit

> https://dev.eclipse.org/mailman/listinfo/equinox-dev

 

_______________________________________________

equinox-dev mailing list

equinox-dev@xxxxxxxxxxx

To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/equinox-dev