The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v4.15.0.
Features
-
Add support for Sentry Structured Logs (#1000)
To enable this feature, add the
sentry_logs
log channel in yourconfig/logging.php
configuration:'channels' => [ ... 'sentry' => [ 'driver' => 'sentry_logs', 'level' => env('LOG_LEVEL', 'info'), ], ... ],
Add
SENTRY_ENABLE_LOGS=true
to your.env
file.Use the Log facade to sent your logs to Sentry. To learn more, head over to the Laravel docs.
use Illuminate\Support\Facades\Log; Log::channel('sentry')->info('User {id} failed to login.', ['id' => $user->id]);
To learn more, head over to our docs.