[logback-dev] [JIRA] Created: (LBCLASSIC-199) better structure for exception in DBAppender

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Mon Mar 22 23:22:16 CET 2010


better structure for exception in DBAppender
--------------------------------------------

                 Key: LBCLASSIC-199
                 URL: http://jira.qos.ch/browse/LBCLASSIC-199
             Project: logback-classic
          Issue Type: Sub-task
          Components: appender
            Reporter: Ceki Gulcu
            Assignee: Logback dev list


Placing each stack trace line in a new row in string form (without explicit columns for the class, file and line number) is a little silly. Instead of aggregating the stack trace into a single line, a separate column for the various exception fields would have been better because it would allow searches based on exception classes/messages or stack traces.

IMO, the nicest approach table structure would be akin to:

CREATE TABLE logging_event_exception (
   event_id INT NOT NULL,
   i SMALLINT NOT NULL, -- 0 for the topmost exception, incremented by one for each nested exception
   exception_class VARCHAR(256) NOT NULL,
   exception_msg VARCHAR(1024),
   stack_trace VARCHAR(16384)
   PRIMARY KEY(event_id, i),
   FOREIGN KEY (event_id) REFERENCES logging_event(event_id));

where i would be incremented by one for each 'root cause'. If in addition, the LOGGING_EVENT table contained the total number of nested exception, it would be rather easy to retrieve the original exception plus its root causes.


-- 
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