Code Coverage by Clover.NET

Re: Stopping the trace target showing messagebox on Error logs

by bezpal :: Rate this Message:

Reply to Author | View in Thread

yeah I can see it too.
Any way to disable it?

Anybody with experience?
Thanks!

Here is the code:
App.Config>>>>>>>>>>>>>>>>>>>>>>>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <configSections>
        <section
          name="nlog"
          type="NLog.Config.ConfigSectionHandler, NLog"/>
  </configSections>


  <nlog >
        <targets>
          <target name="console" type="Console" layout="${date:format=HH\:MM\:ss} ${logger} ${message}"/>
          <target name="trace" type="Trace" layout="${date:format=HH\:MM\:ss} ${logger} ${message}"/>
          <target name="file" type="File" fileName="c:\ActiveMessageUnitTest_Nlog.log"/>
        </targets>

        <rules>
          <logger name="*" minlevel="Trace" writeTo="trace" />
          <logger name="*" minlevel="Trace" writeTo="console" />
          <!--logger name="*" minlevel="Trace" writeTo="file" /-->
        </rules>
  </nlog>
 
</configuration>
<<<<<<<<<<<<<<<<<<<<<<<<<<

Program.cs >>>>>>>>>>>>>>>>>>>>>>>>>>>
using System;
using System.Diagnostics;
using NLog;

namespace Test
{
        class Program
        {
                private static Logger logger = LogManager.GetCurrentClassLogger();

                static void Main(string[] args)
                {
       
                        logger.Error("logger");

                }
        }
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<