我創建了一個custom target for NLog,它工作正常,但是當我編輯nlog.config文件我得到一個警告,This is an invalid xsi:type 'http://www.nlog-project.org/schemas/NLog.xsd:LogMillMessageBus'
NLOG定製目標XSD警告
這是我nlog.config文件:
<?xml version="1.0" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<extensions>
<add assembly="Core.v40.NLog.Extensions"/>
</extensions>
<targets async="true">
<target name="LogMillMessageBus" xsi:type="LogMillMessageBus"/>
<target name="Console" xsi:type="ColoredConsole" layout="${date:format=HH\:mm\:ss.fff} ${message} ${exception:format=tostring}${event-context:item=Details}"/>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="Console" />
<logger name="*" minlevel="Debug" writeTo="LogMillMessageBus" />
</rules>
</nlog>
我可以以某種方式創建我自己的xsd,並追加http://nlog-project.org/schemas/NLog.xsd以便我不會收到警告嗎?
你是否從visual studio得到這個警告? – 2013-06-13 15:13:41
@BrandonAGr您的代碼鏈接被破壞,我有問題進行自定義,您可以請提供一些示例代碼。 – PUG 2014-11-07 17:36:09
@jaminator https://github.com/NLog/NLog/wiki/How-to-write-a-target https://web.archive.org/web/20130129070949/http://nlog-project.org/維基/ How_to_write_a_Target – BrandonAGr 2014-11-09 03:29:06