Download the PHP package goletter/hyperf-sls-log without Composer
On this page you can find all versions of the php package goletter/hyperf-sls-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package hyperf-sls-log
hyperf-sls-log
Hyperf 3.1 阿里云 SLS 日志组件(结构化分层)。
目录结构
| 目录 | 职责 |
|---|---|
Contract/ |
对外接口 |
Client/ |
SLS HTTP API(签名、传输、Protobuf 编码) |
Writer/ |
业务直写 + 批量缓冲 |
Handler/ |
Monolog 适配(很薄) |
Model/ |
LogEntry / QueryResult |
Support/ |
配置、脱敏、落盘、IP |
Protobuf/ |
协议细节(内部,应用层不要依赖) |
安装
配置
用法
1)Monolog(推荐)
config/autoload/logger.php:
2)Writer / Facade
3)底层 Client(查询 / 自定义批量)
行为说明
- 批量:缓冲到
batch_size再 PutLogs - 异步:协程内默认异步推送
- 脱敏:
password/token/secret/...替换为*** - 失败落盘:
runtime/logs/sls_fallback.log - 未就绪:缺 project/logstore/密钥时静默跳过,不影响主流程
破坏性变更(相对旧版)
旧的扁平 API 已移除,请改用:
| 旧 | 新 |
|---|---|
Goletter\AliYun\Sls\ClientInterface |
Contract\SlsClientInterface |
Goletter\AliYun\Sls\Client |
Client\SlsClient |
PutLogsRequest / LogItem |
putLogs(LogEntry[]) |
自己复制的 SLSMonologHandler |
Handler\SlsHandler |
All versions of hyperf-sls-log with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
ext-json Version *
ext-zlib Version *
hyperf/contract Version ~3.1.0
hyperf/coroutine Version ~3.1.0
hyperf/guzzle Version ~3.1.0
hyperf/support Version ~3.1.0
monolog/monolog Version ^3.0
psr/container Version ^1.0 || ^2.0
ext-json Version *
ext-zlib Version *
hyperf/contract Version ~3.1.0
hyperf/coroutine Version ~3.1.0
hyperf/guzzle Version ~3.1.0
hyperf/support Version ~3.1.0
monolog/monolog Version ^3.0
psr/container Version ^1.0 || ^2.0
The package goletter/hyperf-sls-log contains the following files
Loading the files please wait ...