Alibaba Cloud Toolkit is a free IDE plugin that integrates development, testing, operations, diagnostics, and deployment. You can use Alibaba Cloud Toolkit to query and analyze Log Service data directly from your IDE.
Prerequisites
You have activated Log Service. For more information, see Activate Log Service.
You have created and obtained an AccessKey. For more information, see Create an AccessKey.
An Alibaba Cloud account's AccessKey grants full access to all APIs, posing a high security risk. We recommend creating and using a RAM user for API access or routine operations. The RAM user must have the required permissions to manage Log Service resources. For more information, see Create a RAM user and grant permissions.
You have installed and configured Alibaba Cloud Toolkit in IntelliJ IDEA. For more information, see Install and configure Cloud Toolkit in IntelliJ IDEA.
Procedure
This section uses IntelliJ IDEA as an example to demonstrate how to use Log Service in Alibaba Cloud Toolkit. For more information, see Alibaba Cloud Toolkit User Guide.
Open IntelliJ IDEA.
On the top menu bar of IntelliJ IDEA, choose .
In the left-side navigation pane of the Settings dialog box, choose , enter your Access Key ID and Access Key Secret, and then click OK.
On the bottom tab bar of IntelliJ IDEA, click Alibaba Cloud View.
In the new panel, click Alibaba Cloud SLS.
Select the region and Project for Log Service.
The toolkit automatically loads the list of LogStores in the Project.
In the Action column of the target LogStore, click View.
The query and analysis page for the LogStore opens. The operations on this page are similar to those in the Log Service console. For more information, see Quick start for query and analysis.
More operations
On the Alibaba Cloud SLS tab, you can perform the following operations.
Location | Operation | Description |
Left toolbar | open in editor | Opens all loaded logs in the editor. |
Live Tail | Queries logs at regular intervals. The default interval is 5 seconds. | |
filter internal fields | Filters out fields that start with an underscore ( | |
scroll to top | Scrolls to the top of the table. | |
scroll to bottom | Scrolls to the bottom of the table and loads more log entries. | |
Right-click a table entry | view context | Displays logs within a specific time range before and after the current log entry. The supported time ranges are 10 seconds, 1 minute, 5 minutes, and 10 minutes. |
open in editor | Opens the current log entry in the editor. | |
Toolbar on the right side of the table | open in editor | Opens the current log entry in the editor. |