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

DBAppender swallow NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.27
    • Fix Version/s: 0.9.28
    • Component/s: logback-classic
    • Labels:
      None

      Description

      logback.xml :

      <appender name="DB" class="ch.qos.logback.classic.db.DBAppender">
      <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
      <dataSource class ="com.mchange.v2.c3p0.ComboPooledDataSource"></dataSource>
      <driverClass>com.mysql.jdbc.Driver</driverClass>
      <url>jdbc:mysql://localhost:3306/mrb</url>
      <user>root</user>
      <password>admin</password>
      </connectionSource>
      </appender>

      Java code (using DBAppender):

      Date dateFrom = null;
      log.info("Processing code {}; code type is {}; request date {}; record from date {}",new Object[]

      { code, codeType, new Date(), dateFrom }

      );

      DBAppender had null pointer exception on 141 line because of dateFrom, but this exception is swallowed and not shown.

        Attachments

          Activity

            People

            • Assignee:
              ceki Ceki Gülcü
              Reporter:
              artyom Artyom Kalita
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: