All Products
Search
Document Center

Simple Log Service:SDK reference overview

Last Updated:Jun 03, 2026

Simple Log Service (SLS) provides SDKs in .NET Core, Java, Python, PHP, Node.js, C, Go, iOS, Android, and C++ for collecting, querying, and analyzing logs.

Before you begin

All SLS SDKs wrap the SLS API and provide similar features regardless of language:

  • Encapsulates API operations so you don't need to construct requests or parse responses manually. Operations are similar across languages, making it easy to switch between SDKs. API specifications.

  • Handles digital signature logic, eliminating manual signature management. Request signatures.

  • Encapsulates logs in Protocol Buffers (Protobuf) format, abstracting serialization details. Protobuf format.

  • Implements API-defined compression. Some SDKs write logs in compressed mode by default.

  • Provides unified error handling using language-native exception patterns. Error handling mechanism.

  • All current SDKs support only synchronous requests.

SDK list

The following table lists reference documents and GitHub repositories for each SDK.

Note

SLS imposes limits on projects, Logstores, shards, and LogItem size. Review Limits on basic resources before using an SDK.

After collecting logs via an SDK, configure indexes to enable query, analysis, and transformation. Create an index. Quick guide to query and analysis.

SDK language

Reference

GitHub source code

Java

Java SDK overview

Log Service Java SDK, Java Producer Library

.NET Core

.NET Core SDK overview

Log Service .NET Core SDK

PHP

PHP SDK overview

Log Service PHP SDK

Python

Python SDK overview

Log Service Python SDK

Node.js

Node.js SDK overview

Log Service Node.js SDK

C

C SDK

Log Service C SDK

GO

Go SDK overview

Log Service Go SDK

iOS

iOS SDK overview

Log Service iOS SDK, Objective-C SDK

Android

Android SDK overview

Log Service Android SDK

C++

C++ SDK overview

Log Service C++ SDK

HarmonyOS

HarmonyOS SDK overview

Log Service HarmonyOS SDK

Call example

Call the ListProject operation using the Python SDK.

FAQ

What features do the Simple Log Service SDKs support?

The SLS SDKs support most SLS features, including log collection, index creation, query and analysis, data transformation, log consumption, log delivery management, alerting, and scheduled SQL jobs. If a feature is unsupported, upgrade to the latest SDK version or check for updates in subsequent releases.

What is the basic procedure for using a Simple Log Service SDK?

Using an SDK follows a similar workflow to using the console:

  1. Activate Simple Log Service.

  2. Obtain an AccessKey pair.

  3. Create a project and a Logstore.

  4. Collect logs and store them in the Logstore.

  5. Create an index for the logs.

  6. Query and analyze logs, and visualize the results.

  7. Perform operations on log data, such as data transformation, delivery, and alerting.

For simpler operations, use the SLS console. Quick Start.

How do I handle common errors when I debug an SDK?

The SLS SDKs provide built-in error handling. Exceptions fall into the following categories:

  • Exceptions that are returned by Simple Log Service. This type of exceptions are handled by Simple Log Service SDK. For more information about this type of exceptions, see the description and error codes of each API operation. For more information about the error codes, see Error codes.

  • Network exceptions that occur when you use Simple Log Service SDK to send requests. This type of exceptions include network disconnection and server response timeout.

  • Exceptions that are generated by Simple Log Service SDK and related to platforms and programming languages, such as, memory overflow.

Error handling.

For solutions to common errors related to log collection, indexing, query and analysis, and transformation, see the FAQ.

Are there limits on using the Simple Log Service SDKs?

SLS imposes limits on projects, Logstores, shards, and LogItem size. Review Limits on basic resources before using an SDK.

References

Simple Log Service SDK debugging platform

The Alibaba Cloud OpenAPI Developer Portal provides debugging tools, SDKs, examples, and documentation. You can debug SLS API operations without manually constructing requests or handling signatures. OpenAPI Developer Portal.

Command-line interface (CLI)

SLS also provides a command-line interface (CLI) for automated configuration. Command-line interface (CLI).

Billing

Using the SDKs, OpenAPI Developer Portal, and CLI incurs the same fees as using the console. Billing overview.