Enable logging for Machine Learning Studio (classic) web services

APPLIES TO: Applies to.Machine Learning Studio (classic) Does not apply to.Azure Machine Learning


Support for Machine Learning Studio (classic) will end on 31 August 2024. We recommend you transition to Azure Machine Learning by that date.

Beginning 1 December 2021, you will not be able to create new Machine Learning Studio (classic) resources. Through 31 August 2024, you can continue to use the existing Machine Learning Studio (classic) resources.

ML Studio (classic) documentation is being retired and may not be updated in the future.

This document provides information on the logging capability of Machine Learning Studio (classic) web services. Logging provides additional information, beyond just an error number and a message, that can help you troubleshoot your calls to the Machine Learning Studio (classic) APIs.

How to enable logging for a Web service

You enable logging from the Machine Learning Studio (classic) Web Services portal.

  1. Sign in to the Machine Learning Studio (classic) Web Services portal at https://services.azureml.net. For a Classic web service, you can also get to the portal by clicking New Web Services Experience on the Machine Learning Studio (classic) Web Services page in Studio (classic).

    New Web Services Experience link

  2. On the top menu bar, click Web Services for a New web service, or click Classic Web Services for a Classic web service.

    Select New or Classic web services

  3. For a New web service, click the web service name. For a Classic web service, click the web service name and then on the next page click the appropriate endpoint.

  4. On the top menu bar, click Configure.

  5. Set the Enable Logging option to Error (to log only errors) or All (for full logging).

    Select logging level

  6. Click Save.

  7. For Classic web services, create the ml-diagnostics container.

    All web service logs are kept in a blob container named ml-diagnostics in the storage account associated with the web service. For New web services, this container is created the first time you access the web service. For Classic web services, you need to create the container if it doesn't already exist.

    1. In the Azure portal, go to the storage account associated with the web service.

    2. Under Blob Service, click Containers.

    3. If the container ml-diagnostics doesn't exist, click +Container, give the container the name "ml-diagnostics", and select the Access type as "Blob". Click OK.

      Create a new container to store your diagnostic logs


For a Classic web service, the Web Services Dashboard in Machine Learning Studio (classic) also has a switch to enable logging. However, because logging is now managed through the Web Services portal, you need to enable logging through the portal as described in this article. If you already enabled logging in Studio (classic), then in the Web Services Portal, disable logging and enable it again.

The effects of enabling logging

When logging is enabled, the diagnostics and errors from the web service endpoint are logged in the ml-diagnostics blob container in the Azure Storage Account linked with the user's workspace. This container holds all the diagnostics information for all the web service endpoints for all the workspaces associated with this storage account.

The logs can be viewed using any of the several tools available to explore an Azure Storage Account. The easiest may be to navigate to the storage account in the Azure portal, click Containers, and then click the container ml-diagnostics.

Log blob detail information

Each blob in the container holds the diagnostics information for exactly one of the following actions:

  • An execution of the Batch-Execution method
  • An execution of the Request-Response method
  • Initialization of a Request-Response container

The name of each blob has a prefix of the following form:

{Workspace Id}-{Web service Id}-{Endpoint Id}/{Log type}

Where Log type is one of the following values:

  • batch
  • score/requests
  • score/init