You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "vivek (JIRA)" <ji...@apache.org> on 2016/04/22 07:14:12 UTC

[jira] [Created] (ARROW-118) Cant insert log date using stored procedure using log4net

vivek created ARROW-118:
---------------------------

             Summary: Cant insert log date using stored procedure using log4net
                 Key: ARROW-118
                 URL: https://issues.apache.org/jira/browse/ARROW-118
             Project: Apache Arrow
          Issue Type: Bug
            Reporter: vivek


I am trying do logging using stored procedure. I created a stored procedure which will insert a row in to the table

CREATE PROCEDURE [dbo].[usp_insert_log]
(
    @log_date datetime,
    @log_level varchar(10),
    @log_message nvarchar(max)
)
AS
BEGIN
    INSERT INTO [dbo].[Log] ([log_date], [log_level], [log_message])
    VALUES (@log_date, @log_level, @log_message)
END

In my config file

<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
    <bufferSize value="1" />
    <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <connectionStringName  value="AnalyticsLogging" />
    <commandText value="usp_insert_log" />
    <parameter>
        <parameterName value="@log_date" />
        <dbType value="DateTime" />
        <layout type="log4net.Layout.RawTimeStampLayout">
            <conversionPattern value="%date" />
        </layout>
    </parameter>
</appender> 

I am getting the following error

    log4net:ERROR [AdoNetAppender] ErrorCode: GenericFailure. Exception while writing to database
    System.Data.SqlClient.SqlException (0x80131904): Procedure or function 'usp_insert_log' expects parameter '@log_date', which was not supplied.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)