LogUtility 1.1.0.40

This component is a wrapper around log4net.dll. It offers the possibility for synchronous and asynchronous logging.

Install-Package LogUtility -Version 1.1.0.40
dotnet add package LogUtility --version 1.1.0.40
<PackageReference Include="LogUtility" Version="1.1.0.40" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LogUtility --version 1.1.0.40
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Configuration to be added in config file:

.....
<configSections>
<section name="LogConfiguration" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<LogConfiguration>
<appender name="DebugServiceAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="Logs\Debug\Debug-Log.log" />
<Threshold value="DEBUG" />
<appendToFile value="true" />
<preserveLogFileNameExtension value="true" />
<rollingStyle value="Composite" />
<datePattern value=" yyyyMMdd" />
<maxSizeRollBackups value="-1" />
<maximumFileSize value="250MB" />
<layout type="log4net.Layout.PatternLayout" name="DEBUGLogFileAppender">
<conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.fffffff} %level [%property{pid}:%class:%method:%line] - %message%newline" />
</layout>
</appender>
<appender name="GeneralServiceAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="Logs\Info\Info-Log.log" />
<Threshold value="Info" />
<appendToFile value="false" />
<preserveLogFileNameExtension value="true" />
<rollingStyle value="Composite" />
<datePattern value=" yyyyMMdd" />
<maxSizeRollBackups value="-1" />
<maximumFileSize value="250MB" />
<layout type="log4net.Layout.PatternLayout" name="GeneralLogFileAppender">
<conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.fffffff} %level [%class:%method] - %message%newline" />
</layout>
</appender>
<logger name="LogUtil1">
<!--<level value="INFO" />
<appender-ref ref="GeneralServiceAppender" />-->
<level value="Debug" />
<appender-ref ref="DebugServiceAppender" />
</logger>
<logger name="LogUtil">
<level value="INFO" />
<appender-ref ref="GeneralServiceAppender" />
<!--<level value="Debug"/>
<appender-ref ref="DebugServiceAppender"/>-->
</logger>
</LogConfiguration>
....

Configuration to be added in config file:

.....
<configSections>
<section name="LogConfiguration" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<LogConfiguration>
<appender name="DebugServiceAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="Logs\Debug\Debug-Log.log" />
<Threshold value="DEBUG" />
<appendToFile value="true" />
<preserveLogFileNameExtension value="true" />
<rollingStyle value="Composite" />
<datePattern value=" yyyyMMdd" />
<maxSizeRollBackups value="-1" />
<maximumFileSize value="250MB" />
<layout type="log4net.Layout.PatternLayout" name="DEBUGLogFileAppender">
<conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.fffffff} %level [%property{pid}:%class:%method:%line] - %message%newline" />
</layout>
</appender>
<appender name="GeneralServiceAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="Logs\Info\Info-Log.log" />
<Threshold value="Info" />
<appendToFile value="false" />
<preserveLogFileNameExtension value="true" />
<rollingStyle value="Composite" />
<datePattern value=" yyyyMMdd" />
<maxSizeRollBackups value="-1" />
<maximumFileSize value="250MB" />
<layout type="log4net.Layout.PatternLayout" name="GeneralLogFileAppender">
<conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.fffffff} %level [%class:%method] - %message%newline" />
</layout>
</appender>
<logger name="LogUtil1">
<!--<level value="INFO" />
<appender-ref ref="GeneralServiceAppender" />-->
<level value="Debug" />
<appender-ref ref="DebugServiceAppender" />
</logger>
<logger name="LogUtil">
<level value="INFO" />
<appender-ref ref="GeneralServiceAppender" />
<!--<level value="Debug"/>
<appender-ref ref="DebugServiceAppender"/>-->
</logger>
</LogConfiguration>
....

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0.40 153 2/27/2020
1.1.0.32 144 11/1/2019