Hi,
You can achieve it by simply using nLog.
one simple way to do is. Simply set ThreadName what ever you want.
Sample config file :
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >
<variable name="myvar" value="myvalue" />
<targets>
<target name="logfile" xsi:type="File" xmlns:xsi="#unknown">
layout="${longdate} ${logger} ${message}"
fileName="${specialfolder:folder=MyDocuments}/DynamicName/${shortdate}/Event-${threadname}.log" />
</target></targets>
<rules>
<logger name="*" minlevel="Info" writeto="logfile" />
</rules>
</nlog>