Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Logging
Logging [message #29212] Thu, 31 May 2007 11:58 Go to next message
Eclipse UserFriend
Hi,

doeas anybody know how to do logging in the RAP environment. A Simple

private static final Log log = LogFactory.getLog( MyClass.class ); and
log.debug("Hello");

does not work.
Where do i have to put the log4j.properties file?

Or is there any other logging capabilitie that I could use
from equinox or RAP ?

Thanks,
Thomas
Re: Logging [message #29250 is a reply to message #29212] Thu, 31 May 2007 13:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: b.muskalla.gmx.net

Hi Thomas,

i just committed the last pieces for the Platform UI Error Handling.
This way, the platform cares about handling and logging your errors.

For a good overview, see
http://wiki.eclipse.org/index.php/Platform_UI_Error_Handling

Just a little example:
IStatus status = new Status(IStatus.ERROR, "your.plugin.id",
"This should not happen", new NullPointerException());
StatusManager.getManager().handle(status,
StatusManager.SHOW | StatusManager.LOG );

You can specify SHOW, LOG or both. With the SHOW style bit, a nice error
dialog will pop up to inform the user about the exception.

The logfile of your application can be found in <working
directory>/workspace/.metadata/.log where "working directory" is the
directory you specified on the "Arguments" tab of your launch configuration.

I think as part of Milestone 5 and the branding stuff, we will also
introduce the "statushandler" extension point to contribute your own
statushandlers. At the moment, the default workbench handler is used.

Hope that helps you!

Greets
Benny

Thomas Kühne wrote:
> Hi,
>
> doeas anybody know how to do logging in the RAP environment. A Simple
>
> private static final Log log = LogFactory.getLog( MyClass.class ); and
> log.debug("Hello");
>
> does not work.
> Where do i have to put the log4j.properties file?
>
> Or is there any other logging capabilitie that I could use
> from equinox or RAP ?
>
> Thanks,
> Thomas
>
>
Re: Logging [message #30025 is a reply to message #29250] Fri, 01 June 2007 05:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi Benny,

thank you for the fast response. I will check this out.

Thomas

"Benjamin Muskalla" <b.muskalla@gmx.net> schrieb im Newsbeitrag
news:f3mvgo$vpq$1@build.eclipse.org...
> Hi Thomas,
>
> i just committed the last pieces for the Platform UI Error Handling. This
> way, the platform cares about handling and logging your errors.
>
> For a good overview, see
> http://wiki.eclipse.org/index.php/Platform_UI_Error_Handling
>
> Just a little example:
> IStatus status = new Status(IStatus.ERROR, "your.plugin.id",
> "This should not happen", new NullPointerException());
> StatusManager.getManager().handle(status,
> StatusManager.SHOW | StatusManager.LOG );
>
> You can specify SHOW, LOG or both. With the SHOW style bit, a nice error
> dialog will pop up to inform the user about the exception.
>
> The logfile of your application can be found in <working
> directory>/workspace/.metadata/.log where "working directory" is the
> directory you specified on the "Arguments" tab of your launch
> configuration.
>
> I think as part of Milestone 5 and the branding stuff, we will also
> introduce the "statushandler" extension point to contribute your own
> statushandlers. At the moment, the default workbench handler is used.
>
> Hope that helps you!
>
> Greets
> Benny
>
> Thomas K
Re: Logging [message #31004 is a reply to message #29250] Mon, 04 June 2007 15:50 Go to previous message
Eclipse UserFriend
Hi,

just short feedback. Logging works fine as expected.

Thomas
"Benjamin Muskalla" <b.muskalla@gmx.net> schrieb im Newsbeitrag
news:f3mvgo$vpq$1@build.eclipse.org...
> Hi Thomas,
>
> i just committed the last pieces for the Platform UI Error Handling. This
> way, the platform cares about handling and logging your errors.
>
> For a good overview, see
> http://wiki.eclipse.org/index.php/Platform_UI_Error_Handling
>
> Just a little example:
> IStatus status = new Status(IStatus.ERROR, "your.plugin.id",
> "This should not happen", new NullPointerException());
> StatusManager.getManager().handle(status,
> StatusManager.SHOW | StatusManager.LOG );
>
> You can specify SHOW, LOG or both. With the SHOW style bit, a nice error
> dialog will pop up to inform the user about the exception.
>
> The logfile of your application can be found in <working
> directory>/workspace/.metadata/.log where "working directory" is the
> directory you specified on the "Arguments" tab of your launch
> configuration.
>
> I think as part of Milestone 5 and the branding stuff, we will also
> introduce the "statushandler" extension point to contribute your own
> statushandlers. At the moment, the default workbench handler is used.
>
> Hope that helps you!
>
> Greets
> Benny
>
> Thomas K
Previous Topic:error at initial request
Next Topic:Odd exception creating Display
Goto Forum:
  


Current Time: Mon Jun 09 08:00:27 EDT 2025

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

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

Back to the top