2
votes

I have a ASP.NET Core 2.2 app deployed to Azure App Service (Linux). I am unable to see web server logs (HTTP traffic) to the application.

Microsoft support advise that the HTTP traffic should be visible in the xx_default_docker.log file but it isnt. I've verified that the application can log, since my application logs are present.

The docker startup also indicates that HTTP logging is enabled. The default_docker.log is shown below.

2019-08-22 13:54:56.855 INFO  - docker run -d -p 34938:8080 --name xxxx -e WEBSITE_SITE_NAME=xxxx -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=xxxx -e WEBSITE_INSTANCE_ID=e9d7d581f74fa3aa82fed4e52ba7b581a49d7a218f02ccc2fb509536bfb3742f -e HTTP_LOGGING_ENABLED=1 appsvc/dotnetcore:2.2_1905171704  

2019-08-22T13:54:59.044083569Z   _____                               
2019-08-22T13:54:59.044114169Z   /  _  \ __________ _________   ____  
2019-08-22T13:54:59.044119569Z  /  /_\  \___   /  |  \_  __ \_/ __ \ 
2019-08-22T13:54:59.044123669Z /    |    \/    /|  |  /|  | \/\  ___/ 
2019-08-22T13:54:59.044127469Z \____|__  /_____ \____/ |__|    \___  >
2019-08-22T13:54:59.044131769Z         \/      \/                  \/ 
2019-08-22T13:54:59.044135569Z A P P   S E R V I C E   O N   L I N U X
2019-08-22T13:54:59.044139270Z 
2019-08-22T13:54:59.044142970Z Documentation: http://aka.ms/webapp-linux
2019-08-22T13:54:59.044146470Z Dotnet quickstart: https://aka.ms/dotnet-qs
2019-08-22T13:54:59.044150070Z .NETCore runtime version: 2.2.4
2019-08-22T13:54:59.044153770Z 
2019-08-22T13:54:59.271246451Z Running oryx -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll     -bindPort 8080 -userStartupCommand '' 
2019-08-22T13:54:59.350208661Z Oryx Version : 0.2.20190611.2, Commit: 61c21ec7356c805d09cc5784e0d27c99f84a325f
2019-08-22T13:54:59.350768864Z 
2019-08-22T13:54:59.916450806Z Writing output script to '/opt/startup/startup.sh'
2019-08-22T13:54:59.931177383Z Startup command was not provided, finding the startup file name...
2019-08-22T13:54:59.935771207Z Found the startup file 'xxxx.dll'
2019-08-22T13:54:59.936288310Z Running the command 'dotnet 'xxxx.dll''...
2019-08-22T13:55:03.945566063Z [40m[1m[33mwarn[39m[22m[49m: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
2019-08-22T13:55:03.946631868Z       No XML encryptor configured. Key {f65d0e04-cd1c-4e7f-9fe3-4d747181c8fe} may be persisted to storage in unencrypted form.
2019-08-22T13:55:09.882317543Z [40m[1m[33mwarn[39m[22m[49m: Microsoft.AspNetCore.Identity.UserManager[5]
2019-08-22T13:55:09.882363644Z       User 72d6fc3a-a134-4fd1-b3fe-8afa100d12b8 is already in role Admin.
2019-08-22T13:55:10.024079981Z Hosting environment: Production
2019-08-22T13:55:10.030438114Z Content root path: /home/site/wwwroot
2019-08-22T13:55:10.030464314Z Now listening on: http://[::]:8080
2019-08-22T13:55:10.031175518Z Application started. Press Ctrl+C to shut down.
2019-08-22T13:55:10.837009409Z [40m[1m[33mwarn[39m[22m[49m: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
2019-08-22T13:55:10.837048710Z       Failed to determine the https port for redirect.

1
So what is the issue you want to ask?Charles Xu
My issue is how do i enable http logsAveer28
Do you enable web server logging in Azure Web Service blade -> monitor -> App service logs as the file system?Charles Xu
Yes I have enabled this.Aveer28
Any updates to solve this issue?karim alaa

1 Answers

2
votes

Microsoft documentation indicate that it isnt possible for Linux yet. https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs

Additionally this was confirmed by @AzureSupport on Twitter https://twitter.com/AveerRa/status/1174683871134330881