Skip to content

Commit 39e918a

Browse files
authored
Merge pull request #129 from getsentry/readme-updates
Readme updates
2 parents 5f69a9b + cab72c1 commit 39e918a

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,47 @@ This could look something like this in for example your `resources/views/error/5
230230
This ID can be searched for in the Sentry interface allowing you to find the error quickly.
231231

232232

233+
## Using Laravel 5.6 log channels
234+
235+
To configure Sentry as a log channel add the following config to the `channels` section in `config/logging.php`:
236+
237+
```php
238+
'channels' => [
239+
// ...
240+
'sentry' => [
241+
'driver' => 'sentry',
242+
],
243+
],
244+
```
245+
246+
After you configured the Sentry log channel you can configure your app to both log to a log file and to Sentry by modifiying the log stack:
247+
248+
```php
249+
'channels' => [
250+
'stack' => [
251+
'driver' => 'stack',
252+
// Add the Sentry log channel to the stack
253+
'channels' => ['single', 'sentry'],
254+
],
255+
//...
256+
],
257+
```
258+
259+
Optionally you can set the logging level and if events should bubble on the driver:
260+
261+
```php
262+
'channels' => [
263+
// ...
264+
'sentry' => [
265+
'driver' => 'sentry',
266+
'level' => null, // The minimum monolog logging level at which this handler will be triggered
267+
// For example: `\Monolog\Logger::ERROR`
268+
'bubble' => true, // Whether the messages that are handled can bubble up the stack or not
269+
],
270+
],
271+
```
272+
273+
233274
## Resolve name conflicts with packages also called Sentry
234275

235276
To resolve this you will need to create your own service provider extending ours so we can prevent naming conflicts.

0 commit comments

Comments
 (0)