All Products
Search
Document Center

Simple Log Service:Overview of Simple Log Service SDK for Java

Last Updated:Jul 31, 2024

Simple Log Service SDK for Java encapsulates all API operations of Simple Log Service. You can use Simple Log Service SDK for Java to call all API operations of Simple Log Service in a convenient manner.

Versions

Before you download Simple Log Service SDK for Java, make sure that you select the required version for the SDK. Simple Log Service uses Maven Repository and GitHub to manage the open paths to the source code and provide sample code for your reference.

Source

Description

Maven Repository

Maven Repository provides paths to the source code packages of Simple Log Service SDKs. The packages include the dependencies that you need to add to your Maven project when you call a Simple Log Service SDK.

Note

We recommend that you obtain the latest version of Simple Log Service SDK for Java for debugging to prevent errors.

For more information, see Alibaba Cloud Simple Log Service SDK for Java.

GitHub

GitHub provides the source code of Simple Log Service SDKs and records tag information about the releases of the SDKs. You can view the source code and sample code that you can use in various scenarios on GitHub. For more information, see Alibaba Cloud Simple Log Service SDK releases for Java.

Sample code

Simple Log Service SDK for Java provides sample code that you can use or reference in various scenarios. The following table provides links to the sample code.

Source code on GitHub

Description

AlertSample.java

Includes sample code that shows how to manage alerts.

DataSample.java

Includes sample code that shows how to pull log data.

LogProject.java

Includes sample code that shows how to create a project.

LoggingSample.java

Includes sample code that shows how to enable the detailed log feature.

SavedSearchSample.java

Includes sample code that shows how to configure the saved search feature.

ClientSample

Includes sample code that shows how to create a Logstore, configuration file, machine group, and index. The sample code also shows how to grant permissions.

ShardBalanceTool.java

Includes sample code that shows how to manage shards.

DataSample

Includes sample code that shows how to query logs, write logs, and view the distribution of logs.