【发布时间】:2018-07-06 17:39:14
【问题描述】:
我需要将日志写入安装 UWP 应用程序的系统的事件查看器。请帮忙
<?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">
<targets>
<target xsi:type="EventLog" name="eventlog" layout="${message}" machineName="." source="TestNlog" log="MyTestNlog" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="eventLog" />
</rules>
</nlog>
【问题讨论】:
标签: c# uwp nlog event-viewer