我的nlog配置如下
<?xml version="1.0" encoding="UTF-8"?>
<nlog throwExceptions="true">
<targets>
<target name="file" type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target type="BufferingWrapper" name="file" bufferSize="120">
<target type="File" fileName="${basedir}/logs/MyApplicationLog.log" layout="${longdate} ${exception:format=tostring} ${message} ${newline}" archiveFileName="${basedir}/archives/MyApplicationLogArchive/MyApplicationLog_{##}.log" archiveEvery="Day" archiveNumbering="Rolling" maxArchiveFiles="7" keepFileOpen="true" openFileCacheTimeout="30" />
</target>
</target>
<target name="MyApplicationHandlerLog" type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target type="BufferingWrapper" name="file" bufferSize="120">
<target type="File" fileName="${basedir}/logs/MyApplicationHandlerLog.log" layout="${longdate} ${exception:format=tostring} ${message} ${newline}" archiveFileName="${basedir}/archives/MyApplicationHandlerLogArchive/MyApplicationHandlerLog_{##}.log" archiveEvery="Day" archiveNumbering="Rolling" maxArchiveFiles="7" keepFileOpen="true" openFileCacheTimeout="30" />
</target>
</target>
<target name="MyApplicationHandlerMetrics" type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target type="BufferingWrapper" name="file" bufferSize="120">
<target type="File" fileName="${basedir}/logs/MyApplicationHandlerMetrics.log" layout="${longdate} ${exception:format=tostring} ${message} ${newline}" archiveFileName="${basedir}/archives/MyApplicationHandlerMetricsArchive/MyApplicationHandlerMetrics_{##}.log" archiveEvery="Day" archiveNumbering="Rolling" maxArchiveFiles="7" keepFileOpen="true" openFileCacheTimeout="30" />
</target>
</target>
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="file" />
<logger name="MyApplicationHandlerLog" minlevel="Info" writeTo="MyApplicationHandlerLog" />
<logger name="MyApplicationHandlerMetrics" minlevel="Info" writeTo="MyApplicationHandlerMetrics" />
</rules>
</nlog>
我面临以下列出的多个问题 - 需要您的帮助才能对其进行排序。
谢谢, 维诺德
答案 0 :(得分:1)