0

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.)

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).

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?

Howiecamp
  • 2,981
  • 6
  • 38
  • 59

2 Answers2

0

There really is no logic in Azure that would do this. Azure knows nothing about your log files, and would not be doing anything with them, especially something as complex as combining several existing files into one.

So I'll go with the sleep theory on this one :)

David Ebbo
  • 42,443
  • 8
  • 103
  • 117
  • 1
    Well I figured out my "mystery". Nothing happened to my logs at all; I had previously swapped deployment slots and they were sitting in the staging slot. As for my comment about all the logs being combined into a single large log - who knows - it certainly appeared that way at the time! Ideally I'd like to delete this question - hit to rep or not - because there is no value in it as the basis is wrong in the first place. What do you think? Keep or delete? – Howiecamp Oct 26 '15 at 01:25
  • I think it's fine to keep it, as others could potentially make the same mistake and find your last comment helpful. I upvoted it :) – David Ebbo Oct 27 '15 at 16:57
0

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.

Howiecamp
  • 2,981
  • 6
  • 38
  • 59