3

I have Azure Web Apps set to store app logs and iis logs in Blob Storage. This is working, except that each app divides its logs into many disorganized folders, each with a random tag in the name. For example, if my web app is called my-web-app, its logs get put in my-web-app__1E18 at one point in time, then my-web-app__4AE9 at another time, and so on until there are over 20 random parent directories for each app. To make things worse, the time frame of the log files in each parent directory overlaps. Two or more directories could simultaneously contain logs from January, February, and March. This makes it nearly impossible to find the relevant logs for a given hour.

Is there a way I can get all logging to go under a single parent directory for each app? All the logs for my-web-app should go somewhere within a directory of exactly that name. What am I doing wrong?

jschmitter
  • 1,669
  • 19
  • 29
  • I wonder if it's one per process. Is your app scaled out to many instances, or did it go through many restarts during that time? – David Ebbo Apr 26 '18 at 22:12
  • 2
    Have you use deployment slots for your web apps? When I add a slot and enable its log, there will be an extra directory in my container. – Joy Wang Apr 27 '18 at 06:13
  • Our apps are not scaled horizontally, though they do get restarted somewhat frequently. @JoyWang, I think you're onto something in asking about slots. I just noticed that this issue is only occurring in our environments which use slots, but not in our environments without slots. I wonder if there's a way to control the value of the random tag, since it's obviously not the slot name. – jschmitter Apr 27 '18 at 13:50
  • I found some useful blob querying tips [here](https://learn.microsoft.com/en-us/azure/key-vault/key-vault-logging#access), which help when searching for files by time. This doesn't answer question, but will help alleviate the pain of trying to find logs in this structure. – jschmitter Apr 27 '18 at 17:55

0 Answers0