All Products
Search
Document Center

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

Last Updated:Nov 10, 2025

Simple Log Service (SLS) SDK for Java encapsulates all API operations of SLS. You can use SLS SDK for Java to call all API operations of SLS.

Versions

Before you download SLS SDK for Java, make sure that you select the required version of the SDK. SLS uses Maven Repository and GitHub to manage the paths used to download the source code and provides sample code for your reference.

Source

Description

Maven Repository

Maven Repository provides the paths used to download the source code packages of SLS SDK. The packages include the dependencies that you must add to your Maven project when you call SLS SDK.

Note

We recommend that you obtain the latest version of SLS 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 SLS SDK and records the tag information of the releases of SLS SDK. 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

SLS 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 describes how to manage alerts.

PullLogsSample.java

Includes sample code that describes how to pull log data.

LogProject.java

Includes sample code that describes how to create a project.

LoggingSample.java

Includes sample code that describes how to update the service log configurations of a project.

SavedSearchSample.java

Includes sample code that describes how to manage saved searches.

ShardBalanceTool.java

Includes sample code that describes how to manage shards.

LogStoreSample.java

Includes sample code that describes how to create a Logstore.

LogtailConfigSample.java

Includes sample code that describes how to manage Logtail configurations.

MachineGroupSample.java

Includes sample code that describes how to manage machine groups.

IndexSample.java

Includes sample code that describes how to manage log indexes.

QueryLogsSample.java

Includes sample code that describes how to query logs.

PutLogsSample.java

Includes sample code that describes how to write logs.

IngestionSample.java

Includes sample code that describes how to manage ingest processors.

AliyunODPSSinkSample.java

Includes sample code that describes how to manage MaxCompute data shipping jobs.

CreateOSSExport

Includes sample code that describes how to manage data shipping jobs.

SignV4Sample.java

Includes sample code that describes how to set the signature version to V4.