目前,我使用log4net记录/跟踪更多信息。
以下是此工具记录的示例:
INFO MachineName: SERVER2012R3 CreatedDateTime: 11/2/2015 11:43:11 AM Message: Loop at time: 11/02/2015 11:43:11 ProcessId: 4052 ProcessName: Business.vshost
这是配置:
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="Logs\ScheduleService.log"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="5000KB"/>
<staticLogFileName value="true"/>
<encoding value="unicode" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%-5level %m%n" />
</layout>
</appender>
所以,现在我想隐藏/删除一些模式,如MechineName,ProcessID,ProcessName。如何配置?