This topic describes how to enable the log management feature in the API Gateway console. After you enable the feature, you can use Log Service to collect API Gateway access logs.


A project and a Logstore are created. For more information, see Create a project and Create a Logstore.


Note Before you can use a RAM user to enable the log management feature, you must grant the required permissions to the RAM user. For more information, see RAM user authorization.
  1. Log on to the API Gateway console.
  2. In the left-side navigation pane, choose Open API > Logs.
  3. In the top navigation bar, select a region based on your business requirements.
  4. On the Log Management page, click Create Log Configuration.
  5. In the Create Log Configuration dialog box, select the project and Logstore that you created and click Confirm.
  6. In the Tips dialog box, click Go to SLS console.
  7. In the Log Service console, enable the indexing feature. For more information, see Configure indexes.
    After you configure indexes for the Logstore, you can query and analyze the logs in the Logstore.

What to do next

After Log Service collects API Gateway access logs, you can query, analyze, download, ship, and transform the logs. You can also create alert rules for the logs. For more information, see Common operations on logs of Alibaba Cloud services.