RuoVea.ExLog
6.0.1.1
See the version list below for details.
dotnet add package RuoVea.ExLog --version 6.0.1.1
NuGet\Install-Package RuoVea.ExLog -Version 6.0.1.1
<PackageReference Include="RuoVea.ExLog" Version="6.0.1.1" />
paket add RuoVea.ExLog --version 6.0.1.1
#r "nuget: RuoVea.ExLog, 6.0.1.1"
// Install RuoVea.ExLog as a Cake Addin #addin nuget:?package=RuoVea.ExLog&version=6.0.1.1 // Install RuoVea.ExLog as a Cake Tool #tool nuget:?package=RuoVea.ExLog&version=6.0.1.1
RuoVea.ExCache
介绍
LogFactory 操作方法 、日志格式器 LogFormat
支持Net的各个版本和Core系列版本
使用示例
LogFactory.Info("日志内容");
LogFactory.Debug("日志内容");
LogFactory.Warn("日志内容");
LogFactory.Error("日志内容");
LogFactory.Error(Exception error);
LogFactory.Error(Exception error);
LogFactory.Error(string title, Exception error)
相关配置文件
若没有出现 log4net.config 文件新建该文件
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<root>
<level value="ERROR"/>
<level value="WARN"/>
<level value="INFO"/>
<level value="DEBUG"/>
<appender-ref ref="ErrorLog" />
<appender-ref ref="WarnLog" />
<appender-ref ref="InfoLog" />
<appender-ref ref="DebugLog" />
</root>
<appender name="ErrorLog" type="log4net.Appender.RollingFileAppender">
<param name="File" value="log/"/>
<param name="DatePattern" value="/yyyy-MM-dd/"Error.log""/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<staticLogFileName value="false"/>
<maximumFileSize value="10MB"/>
<maxSizeRollBackups value="-1"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<appender name="WarnLog" type="log4net.Appender.RollingFileAppender">
<param name="File" value="log/"/>
<param name="DatePattern" value="/yyyy-MM-dd/"Warn.log""/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<staticLogFileName value="false"/>
<maximumFileSize value="10MB"/>
<maxSizeRollBackups value="-1"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="日期时间:%date - %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="WARN" />
<param name="LevelMax" value="WARN" />
</filter>
</appender>
<appender name="InfoLog" type="log4net.Appender.RollingFileAppender">
<param name="File" value="log/"/>
<param name="DatePattern" value="/yyyy-MM-dd/"Info.log""/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<staticLogFileName value="false"/>
<maximumFileSize value="10MB"/>
<maxSizeRollBackups value="-1"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="日期时间:%date - %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender>
<appender name="DebugLog" type="log4net.Appender.RollingFileAppender">
<param name="File" value="log/"/>
<param name="DatePattern" value="/yyyy-MM-dd/"Debug.log""/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<staticLogFileName value="false"/>
<maximumFileSize value="10MB"/>
<maxSizeRollBackups value="-1"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="DEBUG" />
<param name="LevelMax" value="DEBUG" />
</filter>
</appender>
</log4net>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- log4net (>= 2.0.15)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on RuoVea.ExLog:
Package | Downloads |
---|---|
RuoVea.ExFilter
注入 进行全局的异常日志收集、执行操作日志、参数验证,支持简体中文、繁体中文、粤语、日语、法语、英语. services.ExceptionSetup();// 注入 全局错误日志处 services.ExceptionSetup(ExceptionLog actionOptions);// 注入 全局错误日志处 services.ExceptionSetup(builder.Configuration.GetSection("AopOption:ExceptionLog"));// 注入 全局错误日志处 services.RequestActionSetup();// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(RequestLog actionOptions);// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(builder.Configuration.GetSection("AopOption:RequestLog"));// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.ResourceSetup();//对资源型信息进行过滤 services.ResultSetup();//对结果进行统一 services.ApISafeSetup(AppSign actionOptions);//接口安全校验 services.ApISafeSetup(builder.Configuration.GetSection("AopOption:AppSign"));//接口安全校验 services.ApISignSetup(AppSign actionOptions);//签名验证 ( appKey + signKey + timeStamp + data ); services.ApISignSetup(builder.Configuration.GetSection("AopOption:AppSign"));//签名验证 ( appKey + signKey + timeStamp + data ); services.AddValidateSetup();//模型校验 services.AddUiFilesZipSetup();//将前端UI压缩文件进行解压 不进行接口安全校验 -> NonAplSafeAttribute 不签名验证 -> NonAplSignAttribute 不进行全局的异常日志收集 -> NonExceptionAttribute 不对资源型信息进行过滤 -> NonResourceAttribute 不对结果进行统一 -> NonRestfulResultAttribute |
|
RuoVea.ExGlobal
web 注入 全局错误日志、操作日志记录 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.0.1 | 143 | 7/23/2024 |
8.0.0 | 255 | 11/24/2023 |
7.0.0 | 152 | 7/23/2024 |
6.0.1.1 | 2,303 | 7/23/2024 |
6.0.1 | 3,085 | 6/8/2022 |
6.0.0 | 2,112 | 2/9/2022 |
5.0.6 | 556 | 6/8/2022 |
5.0.5 | 2,013 | 11/26/2021 |
5.0.4 | 2,177 | 11/26/2021 |
5.0.3 | 1,889 | 11/26/2021 |
5.0.2 | 4,692 | 11/24/2021 |
5.0.1 | 1,350 | 9/30/2021 |
5.0.0 | 560 | 9/27/2021 |
2.1.1.2 | 77 | 7/23/2024 |
2.1.1.1 | 149 | 11/24/2023 |
2.1.1 | 499 | 6/9/2022 |
2.1.0 | 475 | 6/8/2022 |
2.0.0 | 90 | 9/22/2024 |