Weasler
Weasler

Reputation: 247

Logging Request in Laravel RouteCollection match

So I'm getting a NotFoundHttpException in my laravel log file, but irritatingly, the exception doesn't particularly pass along too much information as to what exactly happened. In particular, I'm hoping to send the $request variable into the log when the exception is called - any idea on how to do this?
Calling Log::error(print_r($request)) just mentions that Illuminate\Routing\Log is not found.

Upvotes: 0

Views: 62

Answers (1)

The Alpha
The Alpha

Reputation: 146219

Try this instead:

\Log::error(...);

It's a namespacing problem.

Upvotes: 1

Related Questions