One day, I can’t visit my website and get 500 error after development. Of course, I have to find the root cause on app service(Linux) and then fix the bug as soon as possible.
Fortunately, this is not complex. App Service Logging help me find and fix the bug.App Service Logging is important to developers because it provides us with error message/information that we can find root cause.
So today I would like to introduce “How to enable/view App Service log (Azure App Service on Linux)”. Hope it helps.
How to enable/view App Service log
Generally, App Service log is disabled as default. You only view container log (not application log) via Advanced Tools(kudu)/diagnostics. you also find the information “Logging is not enabled for this container” from logs
at first, let’s enable the applicaiton log
Azure Portal > Menu > Click All Resources
Click App Service (Linux) > Click App Service logs
Enable Logging (Filesystem)，Enter Quota (MB) and Retention Period (Days). Then Click Save
View Application Log
For Azure App Service on Linux, You can view application log via kudu/Diagnose and solve problems.
Diagnose and solve problems
Step 1. App Service > Overview > Diagnose and solve problems