RuoVea.OmiLog
10.0.0
dotnet add package RuoVea.OmiLog --version 10.0.0
NuGet\Install-Package RuoVea.OmiLog -Version 10.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.OmiLog" Version="10.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RuoVea.OmiLog" Version="10.0.0" />
<PackageReference Include="RuoVea.OmiLog" />
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 RuoVea.OmiLog --version 10.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RuoVea.OmiLog, 10.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.
#:package RuoVea.OmiLog@10.0.0
#: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=RuoVea.OmiLog&version=10.0.0
#tool nuget:?package=RuoVea.OmiLog&version=10.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RuoVea.OmiLog
介绍:
日志管理 UI界面
日志管理 平台(RuoVea.OmiLog):基于.Net5.0 、.Net6.0 、.Net7.0、.Net8.0构建的简单、跨平台的系统。 系统业务简单、代码清晰,如果您只是单纯只需简单增、删、改、查。没有多余的功能,简单扩展下基本可以满足日常需求。 支持的数据库有 MySql、SqlServer、PostgreSQL、SQLite、Oracle、Firebird(后续支持)
安装教程
Install-Package RuoVea.OmiLog
builder.Services.AddOmiLogSetup();
builder.Services.AddSqlSugarSetup();
builder.Services.AddLogInitSetup();/*需要在 AddSqlSugarSetup之后*/
app.UseOmiLogUI();
示例
builder.Services
.AddRestFulLogSetup<CustomizeSqlSugarLog>()
.AddSqlSugarSetup();
builder.Services
.AddRestfulSetup<CustomizeFilterLog>()
.RequestActionSetup() // 注入 请求日志拦截 [执行操作日志、参数验证 ]
.ExceptionSetup()
SuGarLog
/// <summary>
///
/// </summary>
public class CustomizeSqlSugarLog : ICustomizeSqlSugarLog
{
/// <summary>
///
/// </summary>
public CustomizeSqlSugarLog(IOptions<List<DbConnectionConfig>> dbConnection) : base(dbConnection)
{
}
/// <summary>
/// 异常脚本记录
/// </summary>
/// <param name="sql"></param>
public override void SugarErrorLogString(string sql)
{
Console.WriteLine(sql);
}
/// <summary>
/// 执行脚本记录
/// </summary>
/// <param name="sql"></param>
public override void SugarExecutingLogString(string sql)
{
Console.WriteLine(sql);
}
}
FileLog
/// <summary>
///
/// </summary>
public class CustomizeFilterLog : ICustomizeFilterLog
{
/// <summary>
///
/// </summary>
public CustomizeFilterLog(IOptions<List<DbConnectionConfig>> dbConnection):base(dbConnection)
{
}
/// <summary>
/// 操作日志
/// </summary>
/// <param name="operation"></param>
/// <returns></returns>
public override bool LogOp(ExFilter.Domain.OperationVo operation)
{
List<string> ignoreUrls = new List<string> { "pages", "Index" };
return ignoreUrls.Contains(operation.ActionName);
}
/// <summary>
/// 操作日志
/// </summary>
/// <param name="operation"></param>
/// <returns></returns>
public override bool LogVis(ExFilter.Domain.OperationVo operation)
{
List<string> ignoreUrls = new List<string> { "pages", "Index" };
return operation.Url == "/logex/pages";
}
}
配置信息
/* 数据库链接 - 具体配置见SqlSugar官网(第一个为默认库不需要设置ConfigId)*/
"ConnectionConfigs": [
{
"DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access、OpenGauss、QuestDB、HG、ClickHouse、GBase、Odbc、Custom
"ConnectionString": "DataSource=./database.db", // 库连接字符串
"EnableUnderLine": false, // 启用驼峰转下划线
}
// 其他数据库配置(可以配置多个)
//{
// "ConfigId": "test",
// "DbType": "Sqlite",
// "ConnectionString": "DataSource=./test.db", // 库连接字符串
// "EnableInitDb": true, // 启用库表初始化
// "EnableInitSeed": true, // 启用种子初始化
// "EnableDiffLog": false, // 启用库表差异日志
// "EnableUnderLine": false // 启用驼峰转下划线
// "IsEncrypt": true, //是否加密
// "DbSecurity": "" //链接字符串解密密钥
//}
],
"RequestLog": {
"Enabled": true,
"LogToFile": true, //记录到文件
"LogMore": true, //记录更多内容 如写入数据库 需继承重写 IRestfulFilterLog
"IgnoreApis": ""
},
"ExceptionLog": {
"Enabled": true,
"LogToFile": true,
"LogMore": true
}
菜单
{
"title": "日志管理", "path": "/log", "icon": "el-icon-notebook-2", id: "4",
"children": [
{ id: '4-1', "icon": "el-icon-tickets", "path": "/logvis/index", "title": "访问日志" },
{ id: '4-2', "icon": "el-icon-edit", "path": "/logop/index", "title": "操作日志" },
{ id: '4-3', "icon": "el-icon-warning-outline", "path": "/logex/index", "title": "异常日志" },
{ id: '4-4', "icon": "el-icon-notebook-1", "path": "/logdiff/index", "title": "差异日志" }
],
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- MiniExcel (>= 1.34.2)
- RuoVea.ExFilter (>= 10.0.0.3)
- RuoVea.OmiApi.Log (>= 10.0.0.1)
- RuoVea.OmiUI (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 113 | 3/24/2026 |
| 9.0.0 | 108 | 3/24/2026 |
| 8.0.1.9 | 113 | 3/24/2026 |
| 8.0.1.8 | 121 | 1/27/2026 |
| 8.0.1.7 | 114 | 1/13/2026 |
| 8.0.1.6 | 111 | 1/13/2026 |
| 8.0.1.5 | 218 | 11/25/2025 |
| 8.0.1.4 | 368 | 11/21/2025 |
| 7.0.1.9 | 104 | 3/24/2026 |
| 7.0.1.8 | 111 | 1/27/2026 |
| 7.0.1.7 | 104 | 1/13/2026 |
| 7.0.1.6 | 110 | 1/13/2026 |
| 7.0.1.5 | 220 | 11/25/2025 |
| 7.0.1.4 | 371 | 11/21/2025 |
| 6.0.3.9 | 126 | 3/24/2026 |
| 6.0.3.8 | 115 | 1/27/2026 |
| 6.0.3.7 | 107 | 1/13/2026 |
| 6.0.3.6 | 106 | 1/13/2026 |
| 6.0.3.5 | 216 | 11/25/2025 |
| 6.0.3.4 | 364 | 11/21/2025 |
Loading failed