topthink / think-log
think log
Installs: 8 909
Dependents: 8
Suggesters: 0
Security: 0
Stars: 9
Watchers: 5
Forks: 6
Open Issues: 1
Requires
- php: >=7.1.0
- psr/log: ~1.0
- topthink/think-container: ^2.0
This package is auto-updated.
Last update: 2024-10-08 22:38:31 UTC
README
写入LOG日志,要求PHP7.1+。
主要特性
- 多通道日志写入
- 日志实时/延时写入
- 日志信息格式化
- 日志信息处理机制
- JSON格式支持
- 日志自动清理
安装
composer require topthink/think-log
用法
use think\facade\Log; Log::init([ 'default' => 'file', 'channels' => [ 'file' => [ 'type' => 'file', 'path' => './logs/', ], ], ]); Log::error('error info'); Log::info('log info'); Log::save(); Log::channel('channel_name')->error('test error');