简体   繁体   English

在 Asp.Net MVC 上查看 Serilog 日志

[英]Viewing Serilog logs on Asp.Net MVC

I'm using Serilog in my Asp.Net MVC project.我在我的 Asp.Net MVC 项目中使用 Serilog。 (If it matters, I'm using the SQL Server Sink). (如果重要的话,我正在使用 SQL Server 接收器)。

Previously, I installed StackExchange.Exceptional, and its near so easy to use as Serilog, but it have with a great feature: We can access the logs via web interface, accessing an "exceptions.axd" configured via web.config.以前,我安装了 StackExchange.Exceptional,它和 Serilog 一样易于使用,但它有一个很棒的功能:我们可以通过 Web 界面访问日志,访问通过 web.config 配置的“exceptions.axd”。

I see Serilog is a "low level logger", it can be used in web, desktop, consoles, etc... then obviously it doesnt comes with this ".axd" function.我看到 Serilog 是一个“低级记录器”,它可以在网络、桌面、控制台等中使用......然后显然它没有这个“.axd”功能。

There is some Serilog extension, or project with a simple axd handler like this, where we can install and just works like in StackExchange.Exceptional?有一些 Serilog 扩展,或者像这样一个简单的 axd 处理程序的项目,我们可以在那里安装并像在 StackExchange.Exceptional 中一样工作?

I've implemented a simple log viewer for Serilog and SQLServer sink.我已经为 Serilog 和 SQLServer 接收器实现了一个简单的日志查看器。 It will come in handy if you are using ASP.NET Core.如果您使用 ASP.NET Core,它将派上用场。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM