【发布时间】:2016-11-06 04:21:37
【问题描述】:
谁能告诉我如何在 Essential.Diagnostics.RollingFileTraceListener 中为日志文件设置 MaxSize。这是我的配置
<system.diagnostics>
<sharedListeners>
<add name="filelog" type="Essential.Diagnostics.RollingFileTraceListener, Essential.Diagnostics"
initializeData="C:\Team\LogFiles\{ApplicationName}-{DateTime:MMddyyyy}.log"
template="[{DateTime:MM-dd-yyyy HH':'mm':'ss}] [{MachineName}] {EventType} {Source} : {Message}{Data}"/>
</sharedListeners>
<trace autoflush="true">
<listeners>
<clear />
<add name="filelog" />
</listeners>
</trace>
</system.diagnostics>
【问题讨论】:
标签: c# logging system.diagnostics diagnostics rollingfileappender