I spent all morning looking for a way to add CustomerID, CustomerName, and etc to my logging. I finally stumbled on to this page. And realized event-context would handle what I needed.
My $0.02,
Jamie
Edit: I replied with possible text. Giving a little back. J
Use event-context to add runtime values to your log.
Example:
Within your application you must manually build the LogEventInfo object. This allows you to set the context variables.
dim theLog As NLog.Logger = NLog.LogManager.GetCurrentClassLogger()
Dim theEvent As NLog.LogEventInfo
theEvent = New NLog.LogEventInfo(LogLevel.Trace, "", "This is my log message")
theEvent.Context("CustomerID") = 12345
theEvent.Context("CustomerName") = "Acme, Inc."
theLog.Log(theEvent)
Now the event-context layout render gives you access to these values.