[logback-dev] [JIRA] Commented: (LBCLASSIC-170) DbAppender discards all exception' details
Tomasz Nurkiewicz (JIRA)
noreply-jira at qos.ch
Mon Dec 7 23:26:42 CET 2009
[ http://jira.qos.ch/browse/LBCLASSIC-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11421#action_11421 ]
Tomasz Nurkiewicz commented on LBCLASSIC-170:
---------------------------------------------
If you are interested in this feature let me know, I can implement it and provide a patch.
> 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: Logback dev list
>
> 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