使用LogEntries的默认配置,是否可以在布局中创建插入参数化值?
<nlog>
<extensions>
<add assembly="LogentriesNLog" />
</extensions>
<targets>
<target name="logentries" type="Logentries" debug="true" httpPut="false" ssl="false" layout="${date:format=ddd MMM dd} ${time:format=HH:mm:ss} ${date:format=zzz yyyy} ${logger} {SOME PARAM FROM CONFIG} : ${LEVEL}, ${message}">
</target>
</targets>
<rules>
<logger name="*" minLevel="Trace" appendTo="logentries" />
</rules>
</nlog>
答案 0 :(得分:0)
我有时候是个白痴。
您可以将它们粘贴在布局字符串
中<target name="logentries" type="Logentries" debug="true" httpPut="false" ssl="false" layout="${date:format=ddd MMM dd} ${time:format=HH:mm:ss} ${date:format=zzz yyyy} : ${LEVEL}, ${message}, ${SomeParam}"></target>