I want to be able to set the target's filename to be a fixed name that includes the process's start time and date even if the configuration file is updated due to autoReload="true" being in the nlog intro.
I have tried the following but it recreates the log file when the log file is altered.
<target
name="file"
xsi:type="File"
fileName="C:\Logs\${cached:cached=true:inner=${date:format=yyyyMMdd.HHmmss}}.${processid}.txt"
layout="${time} ${level}: ${message}">
</target>
Is there a way that I can get a time and date that is essentially fixed for the duration of the process no matter how many times the config file is updated and incorporate it into the filename?