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" />
<PackageReference Include="RT.MesWeb.Audit" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=RT.MesWeb.Audit&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
net10.0
- Audit.Mvc.Core (>= 30.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.15)
- Oracle.EntityFrameworkCore (>= 9.23.60)
- RT.MesWeb.Framework (>= 1.0.1)
-
net8.0
- Audit.Mvc.Core (>= 30.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.15)
- Oracle.EntityFrameworkCore (>= 9.23.60)
- RT.MesWeb.Framework (>= 1.0.1)
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.