All Products
Search
Document Center

Simple Log Service:Use SDKs to collect logs

Last Updated:Dec 29, 2023

Simple Log Service provides an SDK for different programming languages, such as .NET, Java, Python, PHP, and C. You can select Simple Log Service SDK for a specific programming language based on your business requirements. 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 Query and analyze logs.

Programming language

References

GitHub source code

Java

Overview of Simple Simple Log Service SDK for Java

Simple Log Service SDK for Java, Simple Log Service SDK for Java 0.6.0 API, and Producer Library

.NET Core

Overview of Simple Log Service SDK for .NET Core

Simple Log Service SDK for .NET Core

.NET

Overview of Simple Simple Log Service SDK for .NET

Simple Log Service SDK for .NET

PHP

Overview of Simple Simple Log Service SDK for PHP

Simple Log Service SDK for PHP

Python

Overview

Simple Log Service SDK for Python and User guide

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 and C Producer Library

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++