I run websites and webjobs on Azure App Service and I want to enable NLog internal debugging to troubleshoot some logging problems. In my NLog configuration code I do:
InternalLogger.LogLevel = LogLevel.Trace;
InternalLogger.LogFile = "nlog.txt";
When run locally during development, nlog.txt
shows up in the application binary directory (bin
). On Azure it does not show up. Assuming perhaps a file system permissions issue I changed the code to:
InternalLogger.LogLevel = LogLevel.Trace;
InternalLogger.LogFile = @"d:\logfiles\nlog.txt";
Azure App Service guarantees that the d:\logfiles\
directory is writable. Yet still no nlog.txt
file.
Ideas?
d:\logfiles\test.txt
from your application. Just to see if you application has proper permissions? – FlounderInternalLogger
before creating any Logger-objects even the static ones that might exist in the Program.cs class. – Flounder