unable to see .log files being created - nlog with asp.net web app

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

unable to see .log files being created - nlog with asp.net web app

laks
I'm trying NLog for the first time with .NET web app. The web app is getting executed perfectly. However, the .log file is not getting created. Thus, unable to see the logged messages. I'm putting both web.config, web.nlog files in appllication root.

Any input is highly appreciated

Here are my web.nlog file contents
=======================

<?xml version="1.0" ?>
<configuration>   
        <configSections>
        <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
    </configSections>
    <nlog autoReload="true">
        <targets>
            <target name="console" type="Console" layout="${longdate}|${logger}|${level}|${message}" />
            <target name="file" type="File" filename="${basedir}/testlog.txt" />
        </targets>
       
        <rules>
            <logger name="*" minlevel="Debug" appendTo="console,file" />
        </rules>
    </nlog>

</configuration>

===================================
here are my web.config file contents

<?xml version="1.0" encoding="utf-8"?>
<configuration>

    <system.web>
        <compilation defaultLanguage="c#" debug="true" />
       
        <trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" /> 
    </system.web>

</configuration>