All Products
Search
Document Center

Simple Log Service:Overview of Simple Log Service SDK

Last Updated:Apr 27, 2025

Simple Log Service provides an SDK for different programming languages, such as .NET Core, Java, Python, PHP, Node.js, C, Go, iOS, Android, and C++. The SDK allows you to perform various operations, such as collecting, querying, and analyzing logs.

Usage notes

Simple Log Service SDK for different programming languages varies in terms of implementation. However, Simple Log Service SDK for different programming languages encapsulates the same operations of Simple Log Service API and provides similar features. Simple Log Service SDK supports the following features:

  • Encapsulation of Simple Log Service API. Simple Log Service SDK implements the underlying API request creation and response parsing. Simple Log Service API for different programming languages supports similar operations. This simplifies the switchover between different programming languages. For more information, see API regulations.

  • Automatic digital signature of API requests. You do not need to specify the digital signature logic of Simple Log Service API. This simplifies the use of Simple Log Service API. For more information, see Request signatures.

  • Protocol Buffer-formatted encapsulation of logs. The logs that are collected by Simple Log Service are encapsulated in the Protocol Buffer format. You do not need to specify a format. For more information, see Protocol Buffer format.

  • Log compression by using the method that is defined in Simple Log Service API. Simple Log Service SDK for several programming languages allows you to specify whether logs can be written to Simple Log Service in compression mode. By default, the compression mode is used.

  • Unified exception handling mechanism. You can use Simple Log Service SDK to handle exceptions based on the programming language. For more information, see Exception handling.

  • Support only for synchronous requests.

Simple Log Service SDK for different programming languages

The following table provides links to the references and GitHub source code of Simple Log Service SDK for different programming languages.

Note

Simple Log Service imposes limits on basic resources, such as the number of projects, the number of Logstores, the number of shards, and the size of LogItem. We recommend that you read the topic about the limits before you use Simple Log Service SDK. For more information, see Limits on basic resources.

After you collect logs to Simple Log Service by using Simple Log Service SDK, you must configure indexes for the logs. Then, you can perform various operations such as query, analysis, and transformation on the logs. For more information, see Create indexes and Guide to log query and analysis.

Programming language

References

GitHub source code

Java

Overview of Simple Simple Log Service SDK for Java

Simple Log Service SDK for Java and Producer Library

.NET Core

Overview of Simple Log Service SDK for .NET Core

Simple Log Service SDK for .NET Core

PHP

Overview of Simple Simple Log Service SDK for PHP

Simple Log Service SDK for PHP

Python

Overview

Simple Log Service SDK for Python

Node.js

Overview of Simple Log Service SDK for Node.js

Simple Log Service SDK for Node.js

C

C Producer SDK

Simple Log Service SDK for C

Go

Overview

Simple Log Service SDK for Go

iOS

Overview of Simple Log Service SDK for iOS

Simple Log Service SDK for iOS and Simple Log Service SDK for Objective-C

Android

Overview of Simple Log Service SDK for Android

Simple Log Service SDK for Android

C++

Overview of Simple Log Service SDK for C++

Simple Log Service SDK for C++

HarmonyOS

Overview of Simple Log Service SDK for HarmonyOS

Simple Log Service SDK for HarmonyOS

Examples

For more information about the examples, see List projects.

FAQ

What features does Simple Log Service SDK support?

Simple Log Service SDK supports most features of Simple Log Service. For example, you can use Simple Log Service SDK to collect, index, query, analyze, transform, consume, and ship logs. You can also configure alerts for logs and manage Scheduled SQL jobs. If you identify a feature that is not supported when you use Simple Log Service SDK, we recommend that you update Simple Log Service SDK to the latest version and try again or pay attention to subsequent SDK version updates.

How do I use Simple Log Service SDK?

Simple Log Service SDK provides end-to-end log management. You can use Simple Log Service SDK in the similar manner as you perform operations in the Simple Log Service console. You can perform the following steps to use Simple Log Service SDK:

  1. Activate Simple Log Service.

  2. Obtain an AccessKey pair.

  3. Create a project and a Logstore.

  4. Collect logs and store the logs to the Logstore.

  5. Create indexes for the logs.

  6. Query and analyze the logs and visualize the query and analysis results.

  7. Transform and ship the logs, and configure alerts for the logs.

Simple Log Service provides a console in which you can perform operations in an efficient manner. For more information, see Getting Started.

How do I handle common errors that may occur when I use Simple Log Service SDK?

Simple Log Service SDK provides error handing logic. The following errors may occur when you use Simple Log Service SDK.

  • 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.

For more information, see Exception handling.

When you use Simple Log Service SDK to perform operations such as log collection, index management, data query and analysis, and data transformation, errors may occur. You can handle the errors based on the Simple Log Service FAQ. For more information, see FAQ.

Are limits imposed when I use Simple Log Service SDK?

Yes, Simple Log Service imposes limits on basic resources such as the number of projects, the number of Logstores, the number of shards, and the size of LogItem. We recommend that you read the topic about the limits before you use Simple Log Service SDK. For more information, see Limits on basic resources.

After you collect logs to Simple Log Service by using Simple Log Service SDK, you must configure indexes for the logs. Then, you can perform various operations such as query, analysis, and transformation on the logs. For more information, see Create indexes and Guide to log query and analysis.

Are documents that provide sample code of Simple Log Service SDK available?

References

Debugging platform for Simple Log Service SDK

Alibaba Cloud provides OpenAPI Explorer for you to debug Simple Log Service SDK. The platform also provides other SDKs, examples, and related documents. You can use OpenAPI Explorer to debug Simple Log Service API operations without the need to manually encapsulate or sign requests. For more information, visit OpenAPI Explorer.

Simple Log Service CLI

Simple Log Service provides the CLI to meet the requirements for automated configurations. For more information, see Overview of Simple Log Service CLI.

Billing

The fees you are charged when you manage specific resources by using Simple Log Service SDK, OpenAPI Explorer, and Simple Log Service CLI are the same as the fees you are charged when you manage the resources in the Simple Log Service console. For more information, see Billing overview.