PHPackages                             tencentcloud/tencentcloud-cls-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. tencentcloud/tencentcloud-cls-sdk-php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

tencentcloud/tencentcloud-cls-sdk-php
=====================================

The Php SDK of Tencent Cloud CLS log service

v2.0.0(1mo ago)45.3k↓11.7%1Apache-2.0PHPPHP &gt;=8.1.0

Since Apr 22Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/TencentCloud/tencentcloud-cls-sdk-php)[ Packagist](https://packagist.org/packages/tencentcloud/tencentcloud-cls-sdk-php)[ Docs](https://github.com/TencentCloud/tencentcloud-sdk-php)[ RSS](/packages/tencentcloud-tencentcloud-cls-sdk-php/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

TencentCloud Php Log Service PHP SDK
====================================

[](#tencentcloud-php-log-service-php-sdk)

SDK RELEASE TIME
----------------

[](#sdk-release-time)

2022-04-20

Introduction
------------

[](#introduction)

Log Service SDK for PHP，used to set log data to TencentCloud CLS Log Service.

API Reference:

### Summary

[](#summary)

1. Request-Request style Restful API interface
2. Use Protocol buffer to send data
3. Data can be protobuf compressed when sending to server
4. TencentCloudLogException will be thrown if any error happen
5. Introduce simple logger for submit log easily with different levels
6. Create local log cache to submit several logs in single http post.

Environment Requirement
-----------------------

[](#environment-requirement)

1. PHP 5.6.0 and later：Master Branch

LZ4 压缩上传
--------

[](#lz4-压缩上传)

1、暂不支持LZ4 压缩上传

密钥信息
----

[](#密钥信息)

accessKeyId和accessKey为云API密钥，密钥信息获取请前往[密钥获取](https://console.cloud.tencent.com/cam/capi)。并请确保云API密钥关联的账号具有相应的[SDK上传日志权限](https://cloud.tencent.com/document/product/614/68374#.E4.BD.BF.E7.94.A8-api-.E4.B8.8A.E4.BC.A0.E6.95.B0.E6.8D.AE)

Demo
----

[](#demo)

```
