When calling (Illuminate\Support\Facades\)Log::error
I can only see the message on Bugsnag but not the contextual information. Is there a way I can set-up Laravel/Bugsnag to also pass context?
For example, when doing Log::error("Exception occurred.", ["Further info here."]);
only the message ("Exception occurred.") is displayed on Bugsnag.
When you call Log::error
the logged message and context are parsed by the Bugsnag PSR Logger. The uses the context in a few ways:
title
from the context array if set. This title
will then become the context in which your error is displayed on the Bugsnag dashboard.exception
from the context array if set. This exception
will then be used to create the error report and stacktraces.context
array contains sub-arrays they will be displayed on separate tabs, if not the information will be displayed in a custom
tab in the error on the Bugsnag dashboard.In your case, I would check out the custom
metadata tab on your error and see if your context has turned up there.