LogEntries 配置中的参数
Params in LogEntries configuration
使用 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>
有时候我是个白痴。
您可以将它们粘贴在布局字符串中
<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>
使用 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>
有时候我是个白痴。
您可以将它们粘贴在布局字符串中
<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>