RT.MesWeb.Audit 1.0.1

dotnet add package RT.MesWeb.Audit --version 1.0.1
                    
NuGet\Install-Package RT.MesWeb.Audit -Version 1.0.1
                    
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="RT.MesWeb.Audit" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RT.MesWeb.Audit" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="RT.MesWeb.Audit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RT.MesWeb.Audit --version 1.0.1
                    
#r "nuget: RT.MesWeb.Audit, 1.0.1"
                    
#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.
#:package RT.MesWeb.Audit@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RT.MesWeb.Audit&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=RT.MesWeb.Audit&version=1.0.1
                    
Install as a Cake Tool

Audit 使用说明

配置要求

  • 需要在 appsettings.json 中添加以下配置:
{
    "Audit": {
        "ConnectionString": "Server=127.0.0.1;uid=sa;pwd=password;database=dbname;Trust Server Certificate=true;",
        "DatabaseType": "SqlServer",    // 可选值:SqlServer / Oracle
        "RequestLogLength": 1000,       // 日志记录请求内容长度上限,为0表示不限制长度,默认为1000
        "EnableLoginLog": true,         // 是否启用登录日志,默认为true
        "EnableOperationLog": true,     // 是否启用操作日志,默认为true
    },
}

数据库要求

  • AuditEntities指向的数据库应当包含以下表:
    • SYS_LOGIN_LOG:登录日志。
    • SYS_OPER_LOG:操作日志。
  • AuditEntities指向的数据库应当包含以下序列:
    • SYS_SEQ_NO:用于生成日志编号的序列。
  • 数据库中应包含序号生成机制
    • SQL Server:应包含生成Sequence的存储过程和Sequence序列对象
    • Oracle:包含生成Sequence的序列对象即可

使用说明

  • 应用程序构建时应调用以下方法:

// 在应用程序构建前调用以下方法以注册审计服务
services.ConfigureAudit(configuration);

// 在应用程序构建后调用以下方法以启用审计功能
app.ConfigureAudit();

  • AuditEntities不用依赖注入,若需要使用AuditEntities进行数据库操作,可直接实例化对象:
using (var dbContext = new AuditEntities(options))
{
    // 使用dbContext进行数据库操作
}
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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RT.MesWeb.Audit:

Package Downloads
RT.MesWeb.Authentication

Authentication server for mes system

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 123 5/8/2026
1.0.0 112 4/27/2026