|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( "..." ) )
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().
> On 7 Oct 2015, at 09:38, Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
> 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
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
equinox-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit