Asp.net Core Azure Web应用程序日志记录

编程入门 行业动态 更新时间:2024-10-28 10:28:27
本文介绍了Asp Core Azure Web应用程序日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经将asp核心部署为Azure,并且我正在尝试使用Microsoft.Extentions.Logging接口将日志记录配置到我的应用程序中.

I have an asp core deployed to azure, and I am trying to configure logging to my application using the Microsoft.Extentions.Logging interfaces.

当前我的应用程序正在将日志写入Web应用程序存储中的日志文件"文件夹.

currently my app is writing the logs to Log Files folder in the web app storage.

这似乎是记录我的更改的正确位置.但是,我想在普通界面中查看这些日志-每次下载文本文件都有点烦人.

This seems like the right place to log my changes. However, I want to view these logs in a normal interface - downloading a text file everytime, is kinda annoying.

我已经研究了应用程序见解和天蓝色的诊断日志,但是都没有建议如何使用ILogger界面使用它.

I have looked into application insights, and azure diagnostic logs, but none of them suggest how to work with it using the ILogger interface.

推荐答案

首先,您必须在Azure上的应用程序中配置日志:

First of all you have to configure logs in your application on Azure:

还有一个选项可以查看应用程序控制台的输出:

There is also an option to look at the application console output:

您还可以在Azure上配置存储并在此处保存日志(您可以在诊断日志部分中进行配置.

You can also configure Storage on Azure and save logs there (you can configure that in Diagnostic logs section).

更多推荐

Asp.net Core Azure Web应用程序日志记录

本文发布于:2023-11-04 05:57:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1557136.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   日志   net   Asp   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!