locked
Azure Applicattion Logging not working RRS feed

  • Question

  • My web app deployed to an Azure App Services has stopped to log from System.Diagnostics.Trace

    Application logging set in Azure settings for filesystem and blob

    I'm not sure at which stage it has stopped to fail to log, I suspect might be caused by any package added through Nugget.

    I've created a new app from scratch and it logs all the info into file system and into Azure blob storage without any web.config update or adding any package.

    How can I find the issue with the System.Diagnostics dll?

    Nothing to show really in the web.config, just a default one.


    Friday, October 13, 2017 2:32 PM

Answers

  • Hi David,

    thanks for all your replies.

    I realized the issues show when I added the web config transformations.

    Doing so, I needed to update Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers nuget packages. From there, that seems to mess my project.

    So, I did create a new project from starch, and using the same web site that wasn't working previously, deployed the new web site with my old pages content and the logs were working for file system and blob.



    Wednesday, October 18, 2017 9:58 AM

All replies

  • How are you deploying your application? And if you debug it in VS and look at the Output / Debug windows, do you see the trace messages?

    If you don't, one possibility us that you don't have the TRACE constant defined. Look in the Build section of the project properties.

    David

    Friday, October 13, 2017 5:20 PM
  • I deploy the web app with publish functionality in Visual Studio (importing the App Service publish profile)

    I do see trace message while debugging.

    It was working but stopped at some point. It's not logging any Application logs in file system or blob, while it saves all other logs (Web Server, Detailed error, Failed request tracing..)

    Monday, October 16, 2017 9:20 AM
  • Using Kudu Console, can you check the content of your D:\home\site\diagnostics\settings.json?
    Monday, October 16, 2017 3:34 PM
  • Also, another test to help isolate: if you create a new Azure Web App and deploy your exact same app from the same VS to it, does it work?

    I know you wrote "I've created a new app from scratch", but it's not clear whether you are referring to a new Azure Web App, or a new app in VS.

    Monday, October 16, 2017 3:36 PM
  • Hi David,

    thanks for all your replies.

    I realized the issues show when I added the web config transformations.

    Doing so, I needed to update Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers nuget packages. From there, that seems to mess my project.

    So, I did create a new project from starch, and using the same web site that wasn't working previously, deployed the new web site with my old pages content and the logs were working for file system and blob.



    Wednesday, October 18, 2017 9:58 AM
  • Glad that fixed it!
    Wednesday, October 18, 2017 5:59 PM