You can do this with Azure CLI 2.0 . You can use the following command.
az webapp log config --name --resource-group [--application-logging {false, true}] [--detailed-error-messages {false, true}] [--failed-request-tracing {false, true}] [--level {error, information, verbose, warning}] [--slot] [--web-server-logging {filesystem, off, storage}]
Get help from the az az webapp log config -h help command or official article .
#an example az webapp log config --name shui -g shuiapp --application-logging true --web-server-logging filesystem
source share