开源推荐榜【Sejil一个 .NET带界面的日志管理组件】

Sejil 是一个库,使您能够直接从应用程序捕获、查看和过滤 ASP.net Core 应用程序的日志事件。它支持结构化日志记录、查询以及保存日志事件查询。
开源地址:https://github.com/ZiggyCreatures/FusionCache

在这里插入图片描述
使用方法:

  1. 安装 Sejil 软件包
dotnet add package Sejil --version 3.0.4
  1. 将以下代码添加到 Program.cs:
public static IWebHost BuildWebHost(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .UseSejil()  // <-- Add this line
        .ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());            
  1. 将以下代码添加到 Startup.cs
using Sejil;

public class Startup
{    
    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        // ...
        app.UseSejil();  // <-- Add this line
        // ...
    }
}
  1. 查看日志时需要身份验证:
    public void ConfigureServices(IServiceCollection services)
    {
        services.ConfigureSejil(options =>
        {
            options.AuthenticationScheme = /* Your authentication scheme */
        });
    }
  1. 更改日志页面标题(如果未设置,则默认为 Sejil):
    public void ConfigureServices(IServiceCollection services)
    {
        services.ConfigureSejil(options =>
        {
            options.Title = "My title";
        });
    }

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-27 09:02:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-27 09:02:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-03-27 09:02:02       87 阅读
  4. Python语言-面向对象

    2024-03-27 09:02:02       96 阅读

热门阅读

  1. 【Python笔记-FastAPI】定时任务实现(APScheduler)

    2024-03-27 09:02:02       36 阅读
  2. .net core 将html 转为图片

    2024-03-27 09:02:02       32 阅读
  3. 使用 PointNet 和 PyTorch3D 进行点云分类

    2024-03-27 09:02:02       34 阅读
  4. QEMU安装和使用@Ubuntu(待续)

    2024-03-27 09:02:02       43 阅读
  5. Vue2进阶——组件通信

    2024-03-27 09:02:02       39 阅读
  6. Redis 服务

    2024-03-27 09:02:02       28 阅读