This topic describes how to enable the log management feature in the API Gateway console. After you enable the feature, you can collect API Gateway access logs to Simple Log Service.
Prerequisites
A project and a Logstore are created. For more information, see Create a project and Create a Logstore.
Procedure
Before you can use a Resource Access Management (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.
Log on to the API Gateway console.
In the left-side navigation pane, choose .
In the top navigation bar, select a region based on your business requirements.
On the Log Management page, click Create Log Configuration.
In the Create Log Configuration dialog box, select the project and Logstore that you created, and click Confirm.
In the Tips message, click Go to SLS Console.
In the Simple Log Service console, enable the indexing feature. For more information, see Create indexes.
After you configure indexes for the Logstore, you can query and analyze logs in the Logstore.
What to do next
After API Gateway access logs are collected to Simple Log Service, you can query, analyze, download, ship, and transform the logs. You can also create alerts for the logs. For more information, see Common operations on logs of Alibaba Cloud services.