[NLog] Sample Firebird Configuration

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[NLog] Sample Firebird Configuration

dtarczynski
Hello all. This is sample configuration file for Firebird database as DatabaseTarget.

<targets>
    <target name="database" type="Database" KeepConnection="false" UseTransaction="true">
      <dbprovider>FirebirdSql.Data.FirebirdClient.FbConnection, FirebirdSql.Data.FirebirdClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c</dbprovider>
<ConnectionString>User=USER;Password=PASS;Database=DB.FDB;DataSource=localhost;Charset=NONE;</ConnectionString>
      <commandText>insert into NLOGTABLE(TIME_STAMP, LOGLEVEL, LOGGER, LOGMSG) values(@TIME_STAMP,@LEVEL,@LOGGER,@MESSAGE)</commandText>
      <parameter name="@TIME_STAMP" layout="${date}" />
      <parameter name="@LEVEL" layout="${level}" />
      <parameter name="@LOGGER" layout="${logger}" />
      <parameter name="@MESSAGE" layout="${message}" />
    </target>
  </targets>

Regards
Dariusz TarczyƄski