Target to Oracle dtabase - Target database not found error

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

Target to Oracle dtabase - Target database not found error

chandra
I tried to use the target as database using NLog 2.0 beta version and getting "Target database not found" error.  Below is my NLog.Config file contect. Can anybody help on this.

<?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" throwExceptions="true" autoReload="true"> 
 
  <targets> 
   <target name="oracle" xsi:type="Database" keepConnection="false"
        useTransactions="true"
        dbProvider="System.Data.OracleClient"      
        connectionString="Data Source=MYDATABASE;User Id=MYUID;Password=MYPWD;"
        commandText="insert into LOGTABLE( TIME_STAMP,LOGLEVEL,LOGGER,CALLSITE,MESSAGE)
        values(:DATETIME,:LOGLEVEL,:LOGGER,:CALLSITE,:MESSAGE);"> 
      <parameter name="DATETIME" layout="${longdate}"/> 
      <parameter name="LOGLEVEL" layout="${logger}" /> 
      <parameter name="LOGGER" layout="${logger}" /> 
      <parameter name="CALLSITE" layout="${logger}" /> 
      <parameter name="MESSAGE" layout="${message}" /> 
    </target> 


  </targets> 
  <rules> 
    <logger name="*" minlevel="Debug"  writeTo="database" /> 
  </rules> 
</nlog> 
Reply | Threaded
Open this post in threaded view
|

Re: Target to Oracle dtabase - Target database not found error

harry180
in rules change writeTo="database" to writeTo="oracle"
now nlog doesn't know what target is because u change name of that target.