【文件属性】:
文件名称:AspNetCore.Serilog.RequestLoggingMiddleware:使用Serilog记录请求的ASP.NET Core中间件
文件大小:20KB
文件格式:ZIP
更新时间:2021-05-01 08:14:07
C#
ASP.NET Core Serilog请求记录中间件
使用Serilog记录请求的AspNet Core中间件。 该项目的直接灵感来自以下帖子 。
下载
访问 去下载。
用法
要使用,在配置IApplicationBuilder (例如在Startup.cs的Configure方法中),添加以下内容:
using AspNetCore . Serilog . RequestLoggingMiddleware ;
...
public void Configure ( IApplicationBuilder app )
{
...
app . UseSerilogRequestLogging ();
...
}
或,在Program.cs配置IWebHostBuilder时,添加以下内容:
u
【文件预览】:
AspNetCore.Serilog.RequestLoggingMiddleware-master
----LICENSE(11KB)
----appveyor.yml(2KB)
----src()
--------AspNetCore.Serilog.RequestLoggingMiddleware.sln(2KB)
--------AspNetCore.Serilog.RequestLoggingMiddleware.Tests()
--------AspNetCore.Serilog.RequestLoggingMiddleware()
----.gitignore(5KB)
----README.md(2KB)