tomaj / nette-errbit
Nette Errbit logger library
Installs: 41 975
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >= 5.3.7
- ext-xml: *
- tracy/tracy: ~2.3
Requires (Dev)
This package is not auto-updated.
Last update: 2024-12-18 15:55:40 UTC
README
Errbit (Airbrake) error handler for nette applications. For communication with errbit it use package flippa/errbit-php.
Warning: This logger isn't working well od developemnt mode in nette. Handling errors in production is fine. In development you have Tracy with all stack trace and you don't need to log this errros on errbit.
Instalation
Install package via composer:
composer require tomaj/nette-errbit
Usage
In Nette application add config file:
parameters: errbit: send_errors: true api_key: your-api-key host: errbit-host.com port: 80 # optional secure: false # optional project_root: /your/project/root # optional environment_name: production # optional params_filters: ['/password/', '/card_number/'] # optional backtrace_filters: ['#/some/long/path#'] # optional
All configurations are based on package flippa/errbit-php
In nette application you add this line to bootstrap.php after you create $container:
Tomaj\Errbit\ErrbitLogger::register($container->parameters['errbit']); Tomaj\Errbit\ErrbitLogger::ignoreNotices(); Tomaj\Errbit\ErrbitLogger::addIgnoreMessage('Some exception message text'); // Default log priorities: error, exception. To rewrite call: Tomaj\Errbit\ErrbitLogger::setLogPriorities(array('error', 'exception', 'access'));
Thats it! You should see your logs in your errbit