Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » LogEntry StackTrace
LogEntry StackTrace [message #102638] Thu, 06 December 2007 12:08 Go to next message
Eclipse User
Originally posted by: dieter.schulten.d-velop.de

Hello *,

i am using org.eclipse.equinox.log_1.0.100.v20070226 (Eclipse 3.3)
as osgi logging implementation for a small server application build
on equinox. I also implemented my own LogListener so i get informed
about new log events.

Everything is working just fine, but i am not able to get the stacktrace
of a LogEntry. I understand that the original exceptions are converted
to implementation specific exceptions like
"org.eclipse.equinox.log.LoggedException", but gets the stacktrace lost?


public void logged(LogEntry arg0) {
if (arg0.getException() != null) {

// this command show about 21 lines of the stacktrace on the console
arg0.getException().printStackTrace();

// The length of the stacktrace is zero (no stacktrace)
arg0.getException().getStackTrace().length

}
}

Is there a way to get the whole stacktrace of a logged exception?

Does anyone have any idea or workaround?
(maybe i have an understanding problem?)

best regards
dieter
Re: LogEntry StackTrace [message #103409 is a reply to message #102638] Fri, 04 January 2008 22:01 Go to previous message
Simon Kaegi is currently offline Simon Kaegi
Messages: 381
Registered: July 2009
Senior Member
Hi Dieter,

You should log an enhancement request in bugzilla.
getStackTrace was added in Java 1.4 however the OSGi services are written to
work with earlier and mobile VMs.
Perhaps support could be added.

The only workaround I can think of is to write the stacktrace to your own
buffer and then recreate it.

HTH
-Simon


"Dieter" <dieter.schulten@d-velop.de> wrote in message
news:fj8oni$he4$1@build.eclipse.org...
> Hello *,
>
> i am using org.eclipse.equinox.log_1.0.100.v20070226 (Eclipse 3.3)
> as osgi logging implementation for a small server application build
> on equinox. I also implemented my own LogListener so i get informed
> about new log events.
>
> Everything is working just fine, but i am not able to get the stacktrace
> of a LogEntry. I understand that the original exceptions are converted
> to implementation specific exceptions like
> "org.eclipse.equinox.log.LoggedException", but gets the stacktrace lost?
>
>
> public void logged(LogEntry arg0) {
> if (arg0.getException() != null) {
>
> // this command show about 21 lines of the stacktrace on the console
> arg0.getException().printStackTrace();
>
> // The length of the stacktrace is zero (no stacktrace)
> arg0.getException().getStackTrace().length
>
> }
> }
>
> Is there a way to get the whole stacktrace of a logged exception?
>
> Does anyone have any idea or workaround?
> (maybe i have an understanding problem?)
>
> best regards
> dieter
Previous Topic:Deployment Admin Specification & Provisioning ?
Next Topic:Is
Goto Forum:
  


Current Time: Sat Oct 25 14:37:19 GMT 2014

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

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