felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: Stacktraces are not displayed by the "log" Felix shell command
Date Fri, 15 Jan 2010 21:50:35 GMT
Seems ok to me. Open a JIRA issue.

-> richard

On 1/15/10 16:36, Pierre De Rop wrote:
> Hello everyone,
>
> I'm using the felix log service, and I noticed that exceptions stracktraces
> are not dumped, when invoking the felix "log" shell command.
> Indeed, in the shell, the LogCommandImpl.display method is currently doing
> this:
>
>          if (entry.getException() != null)
>          {
>
> buffer.append(entry.getException().getClass().getName()).append(":
> ").append(
>                  entry.getException().getMessage());
>          }
>
> And, currently, it's impossible to inspect stacktraces, using the "log"
> command.
> So, would you be ok for the following fix ->
>
>          if (entry.getException() != null)
>          {
>              StringWriter writer = new StringWriter();
>              PrintWriter  pw = new PrintWriter(writer);
>              entry.getException().printStackTrace(pw);
>              buffer.append(writer.toString());
>          }
>
> thanks;
> /pierre
>
>    

Mime
View raw message