0
我有一个目标NLOG:如何让NLog解析文件内容渲染器的内容?
<target name="AspNetAsyncWrapperForMail" xsi:type="ASPNetBufferingWrapper">
<target name="mail" xsi:type="Mail"
subject="Error: ${callsite:includeSourcePath=False}"
smtpServer="MySMTP"
from="[email protected]"
to="[email protected]"
smtpAuthentication="None"
body="${date}${file-contents:${basedir}/error.html}"
html="true"/>
</target>
的error.html看起来是这样的:
<div>
<b>Message</b>=${message}
</div>
我怎样才能得到NLOG解析中的error.html的内容,使$ {}消息使用NLog规则渲染param?
只是为了清楚。由于某些重大更改,这在版本2中不起作用。看这里:http://nlog-forum.1685105.n2.nabble.com/CompiledLayout-GetFormattedMessage-Layout-Render-td6503485.html – sprinter252 2011-11-14 10:35:42