RuoVea.ExLog 8.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package RuoVea.ExLog --version 8.0.0                
NuGet\Install-Package RuoVea.ExLog -Version 8.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RuoVea.ExLog" Version="8.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RuoVea.ExLog --version 8.0.0                
#r "nuget: RuoVea.ExLog, 8.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RuoVea.ExLog as a Cake Addin
#addin nuget:?package=RuoVea.ExLog&version=8.0.0

// Install RuoVea.ExLog as a Cake Tool
#tool nuget:?package=RuoVea.ExLog&version=8.0.0                

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/&quot;Error.log&quot;"/>
    
    <appendToFile value="true"/>
    
    <rollingStyle value="Composite"/>
    
    <staticLogFileName value="false"/>
    
    <maximumFileSize value="200MB"/>
    
    <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/&quot;Warn.log&quot;"/>
    
    <appendToFile value="true"/>
    
    <rollingStyle value="Composite"/>
    
    <staticLogFileName value="false"/>
    
    <maximumFileSize value="200MB"/>
    
    <maxSizeRollBackups value="-1"/>
    
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%message"/>
    </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/&quot;Info.log&quot;"/>
    
    <appendToFile value="true"/>
    
    <rollingStyle value="Composite"/>
    
    <staticLogFileName value="false"/>
    
    <maximumFileSize value="200MB"/>
    
    <maxSizeRollBackups value="-1"/>
    
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%message"/>
    </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/&quot;Debug.log&quot;"/>
    
    <appendToFile value="true"/>
    
    <rollingStyle value="Composite"/>
    
    <staticLogFileName value="false"/>
    
    <maximumFileSize value="200MB"/>
    
    <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 Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 105 7/23/2024
8.0.0 250 11/24/2023
7.0.0 130 7/23/2024
6.0.1.1 1,661 7/23/2024
6.0.1 3,077 6/8/2022
6.0.0 2,107 2/9/2022
5.0.6 526 6/8/2022
5.0.5 2,008 11/26/2021
5.0.4 2,172 11/26/2021
5.0.3 1,884 11/26/2021
5.0.2 4,687 11/24/2021
5.0.1 1,345 9/30/2021
5.0.0 555 9/27/2021
2.1.1.2 72 7/23/2024
2.1.1.1 144 11/24/2023
2.1.1 492 6/9/2022
2.1.0 470 6/8/2022
2.0.0 83 9/22/2024