Azure网站文件系统中的自定义日志已合并到单个日志文件中 [英] Custom logs in Azure website file system combined into single log file

查看:92
本文介绍了Azure网站文件系统中的自定义日志已合并到单个日志文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Azure Web应用程序(应用程序服务)将日志文件mywebapp.log写入承载网站的VM的d:\ LogFiles目录.当日志文件达到某个大小时,我将其重命名为mywebapp1.logmywebapp2.log,依此类推,并创建了一个新的日志文件. (我是手动执行的-停止网站,重命名文件,然后重新启动网站.)

My Azure web app (App Service) writes a log file mywebapp.log to the d:\LogFiles directory of the VM that hosts the website. When the log file gets to a certain size I rename it to mywebapp1.log, mywebapp2.log, and so on so and a new log file is created. (I do this manually - stop the website, rename the file and restart the site.)

有一天,我通过Kudu(SCM)门户检查了目录,发现只有一个孤独的mywebapp.log,它比正常情况大得多.该文件包含以前存在的所有单个日志(包括mywebapp1.log + mywebapp2.log的内容,依此类推).

One day I inspected the directory through the Kudu (SCM) portal and saw just a lone mywebapp.log that was much larger than normal. The file included all of the individual logs that previously existed (included the contents of mywebapp1.log + mywebapp2.log and so on).

我的应用程序没有合并文件的文件.是否有一个Azure流程可以做到这一点,或者我是在睡觉时做的却没有任何回忆?

My app has no which combines the files. Is there an Azure process that does this or did I do it in my sleep and have no recollection?

推荐答案

问题是我在某个时候交换了部署插槽,但没有意识到d:\ LogFiles目录(我相信整个d:驱动器)都在运行与插槽.丢失的日志文件位于我的登台插槽的LogFiles目录中.

The problem was that I had swapped deployment slots at some point and failed to realize that the d:\LogFiles directory (the entire d: drive I believe) travels with the slot. The missing log files were sitting in my staging slot's LogFiles directory.

这篇关于Azure网站文件系统中的自定义日志已合并到单个日志文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆