Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Proper way to retrieve path to my log
Proper way to retrieve path to my log [message #101213] Wed, 07 November 2007 15:25 Go to next message
Christophe Elek is currently offline Christophe ElekFriend
Messages: 21
Registered: July 2009
Junior Member
I have a simple equinox app. I want to log IStatus. What is the 'proper'
way to get a the path of my log file ?

Right now I have this code that uses internal classes

org.eclipse.core.internal.runtime.Activator runtimeActivator =
org.eclipse.core.internal.runtime.Activator.getDefault();
if (runtimeActivator!=null){
FrameworkLog runtimelog = runtimeActivator.getFrameworkLog();
if (runtimelog!=null)
location = runtimelog.getFile();

--
Christophe Elek
Serviceability Architect
IBM Software Group - Rational
Re: Proper way to retrieve path to my log [message #101237 is a reply to message #101213] Wed, 07 November 2007 15:29 Go to previous messageGo to next message
Christophe Elek is currently offline Christophe ElekFriend
Messages: 21
Registered: July 2009
Junior Member
Christophe Elek <Christophe.Elek@gmail.com> wrote in
news:Xns99E16A179A2B1celekcaibmcom@206.191.52.34:

> I have a simple equinox app. I want to log IStatus. What is the 'proper'
> way to get a the path of my log file ?

Delete... :( Note to self: Read the doc first :(

Platform.getLogLocation should work :D

--
Christophe Elek
Serviceability Architect
IBM Software Group - Rational
Re: Proper way to retrieve path to my log [message #101302 is a reply to message #101213] Thu, 08 November 2007 14:07 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Christophe Elek wrote:
> I have a simple equinox app. I want to log IStatus. What is the 'proper'
> way to get a the path of my log file ?
>
> Right now I have this code that uses internal classes
>
> org.eclipse.core.internal.runtime.Activator runtimeActivator =
> org.eclipse.core.internal.runtime.Activator.getDefault();
> if (runtimeActivator!=null){
> FrameworkLog runtimelog = runtimeActivator.getFrameworkLog();
> if (runtimelog!=null)
> location = runtimelog.getFile();
>

Christophe, What in the above code are internal classes?
The FrameworkLog interface is contained in the
org.eclipse.osgi.framework.log package which is exported by the
Framework (org.eclipse.osgi) and not marked x-internal. The framework
registers a FrameworkLog service which should be publicly available to
any bundle that wants to get the service.

Tom.
Re: Proper way to retrieve path to my log [message #118800 is a reply to message #101302] Thu, 02 October 2008 16:12 Go to previous message
Christophe Elek is currently offline Christophe ElekFriend
Messages: 21
Registered: July 2009
Junior Member
Tom Watson <tjwatson@us.ibm.com> wrote in
news:fgv563$c28$1@build.eclipse.org:

> Christophe Elek wrote:
>> ...
>> org.eclipse.core.internal.runtime.Activator runtimeActivator =
>> org.eclipse.core.internal.runtime.Activator.getDefault();
>> if (runtimeActivator!=null){
>> FrameworkLog runtimelog = runtimeActivator.getFrameworkLog();
>> if (runtimelog!=null)
>> location = runtimelog.getFile();
>>
>
> Christophe, What in the above code are internal classes?
> The FrameworkLog interface is contained in the
> org.eclipse.osgi.framework.log package which is exported by the
> Framework (org.eclipse.osgi) and not marked x-internal. The framework
> registers a FrameworkLog service which should be publicly available to
> any bundle that wants to get the service.


Ahh, so you are saying that even though the package states internal, the
classes are API :)
Or is the way I am getting the FrameworkLog les than optimal ? :)

--
Christophe Elek
Serviceability Architect
IBM Software Group - Rational
Previous Topic:Deploying sample.http.war.feature
Next Topic:Uber-update sites
Goto Forum:
  


Current Time: Fri Mar 29 00:58:25 GMT 2024

Powered by FUDForum. Page generated in 0.02253 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top