You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Michael Goldfinger (JIRA)" <ji...@apache.org> on 2012/09/07 16:56:07 UTC

[jira] [Created] (LOG4NET-353) AdoNetAppender parameter size is mandatory when using DateTime2

Michael Goldfinger created LOG4NET-353:
------------------------------------------

             Summary: AdoNetAppender parameter size is mandatory when using DateTime2
                 Key: LOG4NET-353
                 URL: https://issues.apache.org/jira/browse/LOG4NET-353
             Project: Log4net
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 1.2.11
         Environment: Windows 7, .Net 4.0, MSSQL 2008
            Reporter: Michael Goldfinger
            Priority: Minor


log4net.Appender.AdoNetAppender has problems with DateTime2
This works fine:
<parameter>
      <parameterName value="@log_date"/>
      <dbType value="DateTime"/>
      <layout type="log4net.Layout.RawTimeStampLayout"/>
</parameter>
This gives an internal Exception that size is mandatory:
<parameter>
      <parameterName value="@log_date"/>
      <dbType value="DateTime2"/>
      <layout type="log4net.Layout.RawTimeStampLayout"/>
</parameter>
Workaround:
<parameter>
      <parameterName value="@log_date"/>
      <dbType value="DateTime2"/>
      <size value="-1"/>
      <layout type="log4net.Layout.RawTimeStampLayout"/>
    </parameter>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira