-
$app = app();
$log = $app->make('log'); $log->info('index',['data'=>'this is index']);
//也可以写成 Log::info('index',['data']=>'this is index'); - 存储在app/storage/logs/laravel.log中,我们可以通过linux命令tail -f 日志文件的位置 动态查看日志
$app = app();
$log = $app->make('log'); $log->info('index',['data'=>'this is index']);
//也可以写成 Log::info('index',['data']=>'this is index');