Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-805

DBAppender assumes that caller data is available on the event

    XMLWordPrintable

Details

    Description

      The DBAppender throws an exception if caller data is null on an event.
      This happens in ch.qos.logback.classic.db.DBAppender.bindCallerDataWithPreparedStatement() at line 165.

      We have a scenario where various web-sites are sending log events to a common remote "SocketServer" (using ch.qos.logback.classic.net.SocketAppender). They all use the option: <includeCallerData>false</includeCallerData>

      The common socket server writes to file, but we wanted to try adding a DbAppender there and got an exception.

      Hacking the code to check for callerdata[0] and to set the SQL parms to default values, got around the problem.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            darius Darius X.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: