Kirin 2bd919e148 commit | 2 years ago | |
---|---|---|
.. | ||
src | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
composer.json | 2 years ago |
写入LOG日志,要求PHP7.1+。
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();