# think-log **Repository Path**: wfdaj/think-log ## Basic Information - **Project Name**: think-log - **Description**: No description available - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: 2.0 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-14 - **Last Updated**: 2025-01-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # think-log 写入LOG日志,要求PHP7.1+。 ## 主要特性 * 多通道日志写入 * 日志实时/延时写入 * 日志信息格式化 * 日志信息处理机制 * JSON格式支持 * 日志自动清理 ## 安装 ~~~ composer require topthink/think-log ~~~ ## 用法 ~~~php 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'); ~~~ 更多内容可以参考 https://www.kancloud.cn/manual/thinkphp6_0/1037616