Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-385 DbAppender discards all exception' details
  3. LOGBACK-513

better structure for logging_event_exception table in DBAppender

    XMLWordPrintable

Details

    • Icon: Sub-task Sub-task
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • None
    • logback-classic
    • None

    Description

      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.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            ceki Ceki Gülcü
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: