I've got a process which starts up multiple threads each of which do work continually during the day. I want each thread to write to it's own log file with the following as the file name format. It doesn't seem to work quite right.
fileName="${basedir}/logs/${mdc:item=task}_${shortdate}.log"
I've tried using MappedDiagnosticsContext.Set to set a thread specific item name for the logger to use, but that only works the first time the log is written to for that thread, the next thread changes the item name and everything is written to whatever the last name was.
Is there a way to configure multiple threads to each write to their own log file?
Rick