Kirin 4d67c98a58 1 | 1 rok temu | |
---|---|---|
.. | ||
src | 1 rok temu | |
.gitignore | 1 rok temu | |
LICENSE | 1 rok temu | |
README.md | 1 rok temu | |
composer.json | 1 rok temu |
写入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();