NLog allows me to use SplitGroup to log my messages to several targets. I\'d like to use this feature to log each message to a common, user-specific and date-specific lo
An alternate solution is to use the when condition in the layout.
target.Layout = "${longdate}|[${level}]|${logger}|${message}${onexception:inner=|${exception}${when:when=(level > LogLevel.Warn):inner=|[!] ${exception:format=ToString:innerFormat=Message:maxInnerExceptionLevel=5} }}"
I wanted to just provide the exception message when anything less than error. When there was an error I wanted full stack trace.