<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="
http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" autoReload="true">
<targets>
<target xsi:type="EventLog" name="eventlog" layout="[${logger}] ${message}" log="Application" category="${message}" source="MyApp" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="EventLog" />
</rules>
</nlog>
If I remove the category, it works. But if I specify category="${message}" or category="${Test}", it fails. How do I write custom text in it?