[logback-dev] [JIRA] Commented: (LBCLASSIC-170) DbAppender discards all exception' details
Rü (JIRA)
noreply-jira at qos.ch
Tue Mar 23 08:41:17 CET 2010
[ http://jira.qos.ch/browse/LBCLASSIC-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11666#action_11666 ]
Rü commented on LBCLASSIC-170:
------------------------------
is this not another sub-task for LBCLASSIC-169?!? I intend to use a similar structure for the JpaAppender.
> DbAppender discards all exception' details
> ------------------------------------------
>
> Key: LBCLASSIC-170
> URL: http://jira.qos.ch/browse/LBCLASSIC-170
> Project: logback-classic
> Issue Type: Bug
> Components: appender
> Affects Versions: 0.9.18
> Reporter: Tomasz Nurkiewicz
> Assignee: Ceki Gulcu
> Fix For: 0.9.19
>
>
> DbAppender uses a single table logging_event_exception to persist stack traces, inserting one row per each stack frame. Also, each row has its parent event id. Unfortunately this approach loses a lot of exception details, making it unable to fully recreate ILoggingEvent instance that was logged by the DbAppender. List of attributes that are missing:
> * exception message
> * exception class name
> * exception root cause
> Also logging_event_exception saves the result of ch.qos.logback.classic.spi.StackTraceElementProxy#toString (which refers to java.lang.StackTraceElement#toString) instead of saving each element of java.lang.StackTraceElement separately. Now, in order to recreate StackTraceElement instance one must parse (probably using regular expression) string saved in trace_line attribute.
> My suggestion would be to create two tables:
> * logging_event_throwable with columns: message, class_name and cause foreign key referencing other logging_event_throwable instance
> * logging_event_stack_frame with columns: class_name, method, file, line and a foreign key referencing logging_event_throwable + indexing column
> Also logging_event would have a optional foreign key to logging_event_throwable.
> This modifications in database schema would allow to fully recreate ILoggingEvent. For backward compatibility ch.qos.logback.classic.db.DBAppender should remain untouched. The idea is to subclass it and override ch.qos.logback.classic.db.DBAppender#insertThrowable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the logback-dev
mailing list