[slf4j-dev] [Bug 110] Create a bridge between System.out/System.err and SLF4J

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Tue Apr 21 19:25:46 CEST 2009


http://bugzilla.slf4j.org/show_bug.cgi?id=110





--- Comment #4 from Ceki Gulcu <listid at qos.ch>  2009-04-21 19:25:45 ---
(In reply to comment #3)

> The problem I cannot solve is how to work out
> when the stack trace has ended and hence when it is time to flush the
> aggregated stack trace lines to SLF4J.  

Here is the sequence of events when an event is thrown:

initial line) the message part of the line starts with the fully qualified
class name of the throwable followed by the ':' character followed by the
exception message
stack trace lines) one or more stack trace lines each starting with the string
"\t at"
caused by) in presence of nested exceptions, a line starting with "Caused by:"
followed by the class name of the exception and the exception message
stack trace lines) one or more stack trace lines each starting with the string
"\t at"

If there are exception nested within the nested exception the sequence repeats
at "caused by".

During the sequence shown above the originating class name will by a throwable.
So, as soon as the originating class name is not a throwable, you know the
throwable sequence has ended. In case of successive thorwables immediately
following each other, you know that the throwable has ended when you see a
second "initial line" marking the beginning of the second throwable. 

Unfortunately, you have to wait for a new log statement to determine the end of
the throwable which introduces a new latency, which may be deemed unacceptable.
In particular, if the last exception exception kills the application in which
case there will be no new log statements. 





-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the slf4j-dev mailing list