Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Logging
Logging [message #29212] Thu, 31 May 2007 15:58 Go to next message
Thomas Kühne is currently offline Thomas KühneFriend
Messages: 33
Registered: July 2009
Member
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 17: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 09:01 Go to previous messageGo to next message
Thomas Kühne is currently offline Thomas KühneFriend
Messages: 33
Registered: July 2009
Member
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 19:50 Go to previous message
Thomas Kühne is currently offline Thomas KühneFriend
Messages: 33
Registered: July 2009
Member
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: Sat Apr 27 03:23:25 GMT 2024

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

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

Back to the top