简体   繁体   中英

Azure Cloud Service won't write Worker Role Logs to WADLogsTable

I have an logging problem on Azure Cloud Service which has Web Role and Worker Role. The service write Web Role's Logs to WADLogsTable. But won't write Worker Role's one.

The other day, when this problem happened, I removed the deployment and retried to deploy same package. Then the service was writing worker role's logs normally.

However, I don't know the root cause. Please tell me the solution strategy.

Thanks.

Uploading the package for the work role isn't enough. You can either use the Visual Studio Publish functionality or the following powershell script...

$wadcfgxPath = (Get-Item -Path ".\" -Verbose).FullName + "\{relative Path to your}\workerRole.wadcfgx"
echo Applying $wadcfgxPath to Your worker role 
Add-AzureAccount
$storage = New-AzureStorageContext -StorageAccountName aStorageAccount -StorageAccountKey yourStorageAccountKey
Set-AzureServiceDiagnosticsExtension -ServiceName workRoleServiceName -StorageContext $storage -Role workerRoleName -Slot Production -DiagnosticsConfigurationPath $wadcfgxPath

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM