{"id":213,"date":"2021-09-22T16:44:46","date_gmt":"2021-09-22T14:44:46","guid":{"rendered":"https:\/\/darkcity.fr\/blog\/?p=213"},"modified":"2021-09-22T16:44:46","modified_gmt":"2021-09-22T14:44:46","slug":"microsoft-azure-modifier-la-configuration-dune-application-web-avec-azure-cli","status":"publish","type":"post","link":"https:\/\/darkcity.fr\/blog\/2021\/09\/22\/microsoft-azure-modifier-la-configuration-dune-application-web-avec-azure-cli\/","title":{"rendered":"Microsoft Azure : Modifier la configuration d&rsquo;une Application Web avec Azure CLI"},"content":{"rendered":"<p>Pour modifier avec Azure CLI la configuration des journaux d&rsquo;une application<\/p>\n<p>Il est possible de le faire avec la commande : az webapp log config<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">#\/bin\/bash\r\n\r\n# Variables\r\nmyResourceGroup='my-ressource-group'\r\nappname='appname-wa'\r\n\r\n# Enable all logging options for the Web App\r\naz webapp log config --name $appName --resource-group $myResourceGroup --application-logging 'azureblobstorage' --detailed-error-messages true --failed-request-tracing true --web-server-logging 'filesystem'\r\n<\/pre>\n<\/div>\n<p>Pour v\u00e9rifier vos modifications :<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">az webapp log show --name 'appname-prod-wa' --resource-group 'my-ressource-group'<\/pre>\n<\/div>\n<p>Pour de multiples applications :<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">#\/bin\/bash\r\n\r\n# Variables\r\nmyResourceGroup='my-ressource-group'\r\n\r\nAPP_NAMES=('appname1-prod-wa' 'appname2-prod-wa' 'appname3-prod-wa')\r\n\r\nfor appName in \"${APP_NAMES[@]}\"\r\ndo\r\n        # Enable all logging options for the Web App\r\n        az webapp log config --name $appName --resource-group $myResourceGroup --application-logging 'azureblobstorage' --detailed-error-messages true --failed-request-tracing true --web-server-logging 'filesystem'\r\ndone<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Pour modifier avec Azure CLI la configuration des journaux d&rsquo;une application Il est possible de le faire avec la commande : az webapp log config #\/bin\/bash # Variables myResourceGroup=&rsquo;my-ressource-group&rsquo; appname=&rsquo;appname-wa&rsquo; # Enable all logging options for the Web App az webapp log config &#8211;name $appName &#8211;resource-group $myResourceGroup &#8211;application-logging &lsquo;azureblobstorage&rsquo; &#8211;detailed-error-messages true &#8211;failed-request-tracing true &#8211;web-server-logging &lsquo;filesystem&rsquo; &hellip; <a href=\"https:\/\/darkcity.fr\/blog\/2021\/09\/22\/microsoft-azure-modifier-la-configuration-dune-application-web-avec-azure-cli\/\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Microsoft Azure : Modifier la configuration d&rsquo;une Application Web avec Azure CLI<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,28],"tags":[],"class_list":["post-213","post","type-post","status-publish","format-standard","hentry","category-azure-cli","category-microsoft-azure"],"_links":{"self":[{"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/posts\/213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":1,"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":214,"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/posts\/213\/revisions\/214"}],"wp:attachment":[{"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/media?parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/categories?post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darkcity.fr\/blog\/wp-json\/wp\/v2\/tags?post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}