Kirin 2bd919e148 commit | 3 gadi atpakaļ | |
---|---|---|
.. | ||
src | 3 gadi atpakaļ | |
.gitignore | 3 gadi atpakaļ | |
LICENSE | 3 gadi atpakaļ | |
README.md | 3 gadi atpakaļ | |
composer.json | 3 gadi atpakaļ |
写入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();