Database target problem with BufferingWrapper

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Database target problem with BufferingWrapper

kashbash
Whenever i use BufferingWrapper with database target. I get all the logs duplicated. When i remove the bufferringWrapper everything works fine.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Database target problem with BufferingWrapper

kashbash
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" internalLogFile="E:\workspace\ElMenusV2\nlog.txt" internalLogLevel="Trace">

 
 

  <targets async="true" >
      <wrapper-target xsi:type="BufferingWrapper" bufferSize="5" name="buffer">
          <target xsi:type="Database" name="DB" connectionString="${gdc:connectionString}" >
              <commandText>
                  INSERT INTO .....
              </commandText>
              <parameter name="@userId" layout="${event-context:item=userId}"/>
             ......
          </target>
      </wrapper-target>
  </targets>
    <rules >
        <logger name="*" minlevel="Trace" writeTo="buffer"/>
    </rules>
</nlog>
Loading...