共计有 8 个级别的日志。它们分别是:
- emergency
- alert
- critical
- error
- warning
- notice
- info
- debug
1.配置
2.使用方法
首页引用日志文件
use Illuminate\Support\Facades\Log;
然后在要生成日志的地方添加代码,假设我们使用 info 方法记录日志消息:
Log::info('invoiceId :返回空值');
它会记录在 /storage/logs/ 下的 *.log 日志文件里。默认是laravel.log