Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-489

AdoNetAppender fails after upgrade to 2.0.4

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.14
    • Fix Version/s: 1.2.15
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      Windows

      Description

      with 1.2.13 everything is working fine.
      Update to 1.2.14 (2.0.4 on Nuget), logging fails.
      I would have attached screenshots, but can't work out how.

      For example

      <connectionType
      value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      <connectionStringName value="LabelPrint" />
      <commandText
      value="INSERT INTO dbo.Logging ([LogDate],[Level],[Operation],[OperationInfo],[User],[Label],[Application],[CorrelationId],[Method],[Line],[Logger],[Message],[Exception])
      VALUES (@log_date, @log_level, @operation, @operationInfo, @user, @label, @application, @correlationId, @pgm_method, @pgm_line, @logger, @message, @exception)" />
      <parameter>
      <parameterName value="@log_date" />
      <dbType value="DateTime" />
      <layout type="log4net.Layout.RawUtcTimeStampLayout" />
      </parameter>
      ... etc

      This now causes the error

      'Exception while writing to database System.IndexOutOfRangeException: An SqlParameter with ParamerName '@log_date' is not contained by this SqlParameterCollection ....

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nachbarslumpi Dominik Psenner
                Reporter:
                ImpPhil2 Philip Lee
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: