NLog version: 4.5.11
Platform: . .Net 4.6.1
Current NLog config XML
<nlog autoReload="false" xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
internalLogFile ="${tempdir}/NLog/NlogInternal.log" internalLogLevel="Warn">
This snippet worked with NLog 2.0.1.2: It created the internal log file in the file systems temp dir:
_%TEMP%\NLog\NlogInternal.log_
With NLog 4.5.11 the internal NLog file is created as a subfolder in the application directory:
_AppDir\${tempdir}\NLog\NLogInternal.log_
It seems that layout renderers are no longer working for the internal NLog configuration. I also tried _${environment:TMP}_ but did not work as well
layout renderers aren't supported for internal logging, as the internal logging should be as stable as possible.
if you need more stuff, use InternalLogger.LogWriter
#3031 makes %TMP%\NLog\NLogInternal.log work with NLog 4.6. And if #3092 is merged then ${tempdir} will also work.
OK, that's also fine too me. Thanks snakefoot!
Resolved in NLog 4.6