https://github.com/kwn/kohana-errbit
Errbit integration for Kohana 3.3
https://github.com/kwn/kohana-errbit
Last synced: about 2 months ago
JSON representation
Errbit integration for Kohana 3.3
- Host: GitHub
- URL: https://github.com/kwn/kohana-errbit
- Owner: kwn
- License: other
- Created: 2013-11-22T20:28:35.000Z (over 11 years ago)
- Default Branch: 3.3/master
- Last Pushed: 2013-11-23T00:35:47.000Z (over 11 years ago)
- Last Synced: 2025-02-12T18:55:27.241Z (4 months ago)
- Size: 148 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Errbit integration for Kohana 3.3
## Installation
Use composer...
```json
require: {
[...]
"kwn/kohana-errbit": "dev-3.3/master"
}
```...or clone repository to your ```/modules/``` directory
```
git clone git://github.com/kwn/kohana-errbit.git
```and enable module in ```application/bootstrap.php```
```php
Kohana::modules(array(
[...]
'kohana-errbit' => MODPATH.'kohana-errbit',
));
```## Configuration
Copy ```/modules/kohana-errbit/config/errbit.php``` to ```/application/config/``` and fill config file with your settings.
```php
return array(
'api_key' => 'PUT YOUR ERRBIT API KEY HERE',
'host' => 'errbit.yourdomain.com',
'port' => 80,
'min_env' => Kohana::DEVELOPMENT
);
```Remember to change ```min_env``` to value lower than ```Kohana::DEVELOPMENT``` (ie. ```Kohana::STAGING```), to avoid Errbit requests during development.
Remember to set Kohana environment in your vhost:
```DocumentRoot /var/www/vhosts/com.application/httpdocs
ServerName application.com
SetEnv KOHANA_ENV PRODUCTION```
Of course you need to configure your Errbit, to handle requests from application.
## Ready!
This module registers Kohana Log driver, that handles Errbit notifications on exceptions, and registers error handlers:
```php
set_error_handler();
set_exception_handler();
register_shutdown_function();
```This module uses ```emgiezet/errbitPHP``` vendor. Check for more information.