Getting started
Routing and controllers
Command line
Databases (SQL)
Databases (NoSQL)
Security
Packages
Learn more
- Array helper
- Caching
- Collections
- Command, event and query buses
- Date and time
- File system
- HTML helper
- Humanizer
- Image manipulation
- Internationalization
- Logging
- Number helper
- Pagination
- Retry helper
- Sessions
- String helper
- URL builder
- UUID helper
- Validation
- Views
Official packages
Sentry
The Sentry integration package allows to you to log debug information and exceptions to Sentry.
Installation
Install the package using the following composer command:
composer require mako/sentry
Next you'll have to add a logger.sentry
config key to your application.php
config file.
'logger' =>
[
...
'sentry' =>
[
'dsn' => 'https://<key>@sentry.io/<project>',
],
...
],
Then you'll have to replace the default LoggerService
with the included LoggerService
in the application.php
config file.
'services' =>
[
'core' =>
[
...
mako\sentry\services\LoggerService::class,
...
],
],
And finally you'll have to enable logging to sentry by setting the logger.handler
key in the application.php
config file to the following value:
'logger' =>
[
...
'handler' => ['Sentry', 'Stream'],
...
],
Note that you can disable the default file logging by setting the value to
['Sentry']
.