How to Log object?

后端 未结 5 2200
渐次进展
渐次进展 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:57

    This causes "allocated memory size exhausted" exception in some cases. (e.g native exception class) – Gokigooooks

    Had same problem.

    Log::info(print_r($request->user()->with('groups'), true ) );
    

    Add ->get()

    Log::info(print_r($request->user()->with('groups')->get(), true ) );
    

提交回复
热议问题