Below is the nlog configuration in web.config file
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
</configSections>
<nlog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="logfile" xsi:type="File" fileName="${basedir}/MyLogs/${date:format=yyyy-MM-dd}-api.log" />
<target name="logconsole" xsi:type="Console" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="logfile" />
<logger name="*" minlevel="Info" writeTo="logconsole" />
</rules>
</nlog>
</configuration>
This works perfectly when I run from visual studio. But when I dockerize this and put in Windows container and run the application the contents are written to file target inside the container, but then is getting written in console target. I say this because when I do a docker logs I do not see ant logs getting written to output. Can any one suggest a solution