42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
<log4net>
|
|
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" >
|
|
<param name="File" type="log4net.Util.PatternString" value="%property{LogPath}" />
|
|
<param name="AppendToFile" value="true" />
|
|
<param name="RollingStyle" value="Size" />
|
|
<param name="MaxSizeRollBackups" value="100" />
|
|
<param name="MaximumFileSize" value="1024KB" />
|
|
<param name="StaticLogFileName" value="true" />
|
|
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
<param name="ConversionPattern" value="%date [%-5level] [%property{ModuleName}] %message" />
|
|
</layout>
|
|
</appender>
|
|
|
|
<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
|
|
<mapping>
|
|
<level value="error" />
|
|
<foreColor value="Red, HighIntensity" />
|
|
</mapping>
|
|
<mapping>
|
|
<level value="warn" />
|
|
<foreColor value="Yellow, HighIntensity" />
|
|
</mapping>
|
|
<mapping>
|
|
<level value="info" />
|
|
<foreColor value="Green, HighIntensity" />
|
|
</mapping>
|
|
<layout type="log4net.Layout.PatternLayout">
|
|
<conversionPattern value="%date [%-5level] [%property{ModuleName}] %message" />
|
|
</layout>
|
|
</appender>
|
|
|
|
<!--root>
|
|
<level value="info" />
|
|
</root-->
|
|
|
|
<logger name="PowerShell" additivity="false">
|
|
<!--level value="info" /-->
|
|
<appender-ref ref="ColoredConsoleAppender" />
|
|
<appender-ref ref="RollingFileAppender" />
|
|
</logger>
|
|
</log4net> |