---
title: "Set the Level"
description: "The level - similar to logging levels - is generally added by default based on the integration. You can also override it within an event."
url: https://docs.sentry.io/platforms/php/guides/laravel/usage/set-level/
---

# Set the Level | Sentry for Laravel

The level - similar to logging levels - is generally added by default based on the integration. You can also override it within an event.

```php
\Sentry\withScope(function (\Sentry\State\Scope $scope): void {
    $scope->setLevel(\Sentry\Severity::warning());

    \Sentry\captureMessage('This is now a warning!');
});
```
