logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Psenner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-538) AdoNetAppender to PostgreSQL
Date Mon, 12 Dec 2016 07:36:59 GMT

    [ https://issues.apache.org/jira/browse/LOG4NET-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15741228#comment-15741228

Dominik Psenner commented on LOG4NET-538:

I've tried to work out the root cause of the issue. To me it looks like a configuration/permission/..
issue on the server side of postgres or maybe a postgres driver issue, shadowed behind adonet.
At the moment I have no idea what we could change in log4net to fix your issue. With the provided
information I am unable to reproduce the issue. You'll have to figure this out on your own.
log4net's internal logging may be of help. Let us know about your findings.

> AdoNetAppender to PostgreSQL
> ----------------------------
>                 Key: LOG4NET-538
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-538
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.15
>         Environment: C#
>            Reporter: Cristian Margescu
>              Labels: patch
> I am using the AdoNetAppender to log audits to the database. I was using until some time
the 1.2.13 version with a configuration for MSSQL or PostgreSQL which inserted practically
data as json strings that will later be interpreted by another tool using the following appender
> EX: <appender name="NpgsqlAppender" type="log4net.Appender.AdoNetAppender">
>     <filter type="log4net.Filter.LevelRangeFilter">
>       <levelMin value="AUDIT" />
>       <levelMax value="AUDIT" />
>     </filter>
>     <bufferSize value="1"/>
>     <connectionType
>       value="Npgsql.NpgsqlConnection, Npgsql" />
>     <connectionString
>       value="Server={myServer};Port=5432;Database={database};User Id={myuser};Password={mypassword}"
>     <commandText value="INSERT INTO audit (message) VALUES (@message);" />
>     <reconnectOnError value="true" />
>     <useTransactions value="false"/>
>     <parameter>
>       <parameterName value="@message" />
>       <dbType value="String" />
>       <layout type="log4net.Layout.PatternLayout" >
>         <conversionPattern value="%message"/>
>       </layout>
>     </parameter>
>   </appender>
> It worked great until I have updated to 1.2.15 and then we have noticed that the PosgreSQL
appender did not worked any more. After doing some research and testing I have narrowed it
down to the AdoNetAppender
> that probably has a problem with the parameters because it shows a PG error 47203 as
column "message" not found.

This message was sent by Atlassian JIRA

View raw message