You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package supports configuration through the services configuration file located in `config/services.php`. All configuration variables will be directly passed to Rollbar:
33
37
34
-
'rollbar' => array(
35
-
'access_token' => env('ROLLBAR_TOKEN'),
36
-
'level' => env('ROLLBAR_LEVEL'),
37
-
),
38
+
```php
39
+
'rollbar' => [
40
+
'access_token' => env('ROLLBAR_TOKEN'),
41
+
'level' => env('ROLLBAR_LEVEL'),
42
+
],
43
+
```
38
44
39
45
The level variable defines the minimum log level at which log messages are sent to Rollbar. For development you could set this either to `debug` to send all log messages, or to `none` to sent no messages at all. For production you could set this to `error` so that all info and debug messages are ignored.
40
46
@@ -43,36 +49,46 @@ Usage
43
49
44
50
To automatically monitor exceptions, simply use the `Log` facade in your error handler in `app/Exceptions/Handler.php`:
45
51
46
-
public function report(Exception $e)
47
-
{
48
-
\Log::error($e);
52
+
```php
53
+
public function report(Exception $e)
54
+
{
55
+
\Log::error($e);
56
+
return parent::report($e);
57
+
}
58
+
```
49
59
50
-
return parent::report($e);
51
-
}
52
60
53
61
For Laravel 4 installations, this is located in `app/start/global.php`:
54
62
55
-
App::error(function(Exception $exception, $code)
56
-
{
57
-
Log::error($exception);
58
-
});
63
+
```php
64
+
App::error(function(Exception $exception, $code)
65
+
{
66
+
Log::error($exception);
67
+
});
68
+
```
59
69
60
70
Your other log messages will also be sent to Rollbar:
61
71
62
-
\Log::debug('Here is some debug information');
72
+
```php
73
+
\Log::debug('Here is some debug information');
74
+
```
63
75
64
76
*NOTE*: Fatal exceptions will always be sent to Rollbar.
65
77
66
78
### Context informaton
67
79
68
80
You can pass user information as context like this:
0 commit comments