How to Log object?

后端 未结 5 2110
渐次进展
渐次进展 2021-02-01 13:21

I can see that Log facade is very useful. In the docs of laravel:

The logger provides the eight logging levels defined in RFC 5424: emergency, alert, cr

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 13:49

    You can log either by print_r or json_encode. json_encode is more readable.

    For example:

    use Illuminate\Support\Facades\Log;
    
    Log::info(json_encode($user)); 
    

提交回复
热议问题