Reputation: 731
I am not very familiar with NLOG, so I am hoping someone can point me in the right direction to solving this problem. I don't want NLOG to create a debug.txt file. I thought simple updating the minlevel to "Info", would solve it, but it does not.
Here are the settings in my app.config file that point NLOG:
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true">
<variable name="applicationName" value="TheNameOfMyApplication" />
<include file="\\<PathToNlogConfig>\NLog.config" />
</nlog>
And in my NLog.config file in the rules section:
<logger name="Name.Space.Apps.*" minlevel="Info" writeTo="consoleapps" final="true" />
<logger name="*" minlevel="Info" writeTo="fileOut" />
What else do I need to configure to stop this debug.txt file from being created?
Thanks
Upvotes: 0
Views: 1328
Reputation: 731
Solved it. Turns out we were using a library to log to NLOG, and NLOG was grabbing the namespace from that library, and hence hitting a different rule.
Upvotes: 1