[英]How to skip to a specific time in Azure AppService logs
Using Linux App Service on Azure.在 Azure 上使用 Linux 应用服务。 How do I view the logs (app/console logs and HTTP request logs) for a particular time in the past?
如何查看过去特定时间的日志(应用程序/控制台日志和 HTTP 请求日志)?
In other logging apps I can enter a search term, or a time and jump straight to that point to view the logs for that point (and before and after).在其他日志应用程序中,我可以输入搜索词或时间并直接跳转到该点以查看该点(以及之前和之后)的日志。 That's what I'd like to do for Azure.
这就是我想为 Azure 做的事情。
You need to set WEBSITE_TIME_ZONE variable in Application settings.您需要在应用程序设置中设置 WEBSITE_TIME_ZONE 变量。
Supported timezone values are https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
支持的时区值为https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
https://docs.microsoft.com/en-us/azure/app-service/faq-configuration-and-management https://docs.microsoft.com/en-us/azure/app-service/faq-configuration-and-management
You can verify Time by navigating to Console
and executing time
command enter您可以通过导航到
Console
并执行time
命令来验证时间
If you want to search in logs you may download them in txt file into local machine or send the logs to Azure Log Analytics and query them using query language filters如果您想在日志中搜索,您可以将它们以 txt 文件的形式下载到本地计算机或将日志发送到 Azure Log Analytics 并使用查询语言过滤器查询它们
| where TimeGenerated xxx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.