The WindowsIdentityLayoutRenderer
should probably give you what you want. You can choose to log either the Domain, the UserName, or both.
You would configure it something like this (untested) to your NLog.config file:
<targets>
<target name="file" xsi:type="File"
layout="${longdate} | ${level} | ${logger} | ${windows-identity} | ${message}"
fileName="${basedir}/${shortdate}.log" />
</targets>
This might not work in a low privilege environment.
How do you get the user name now? If you get it something like this:
HttpContext.Current.User.Identity.Name
Then you can use NLog's "aspnet-user-identity" LayoutRenderer, something like this:
<targets>
<target name="file" xsi:type="File"
layout="${longdate} | ${level} | ${logger} | ${aspnet-user-identity} | ${message}"
fileName="${basedir}/${shortdate}.log" />
</targets>
NLog's aspnet* LayoutRenderers are in NLog.Extended.sll, so you will need that dll in addition to NLog.dll.