| Conditions | 2 |
| Paths | 2 |
| Total Lines | 25 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace App\Providers; |
||
| 16 | 19 | public function register() |
|
| 17 | { |
||
| 18 | # Adding Hipchat and Gitter handlers to Monolog logger for non-production environments. |
||
| 19 | 19 | if (!app()->environment('production')) { |
|
| 20 | /* |
||
| 21 | |-------------------------- |
||
| 22 | | Hipchat integration |
||
| 23 | |-------------------------- |
||
| 24 | */ |
||
| 25 | 19 | $hipchatConfig = app('config')->get('services.hipchat'); |
|
| 26 | 19 | $hipchatHandler = new \Monolog\Handler\HipChatHandler( |
|
| 27 | 19 | $hipchatConfig['token'], |
|
| 28 | 19 | $hipchatConfig['room'], |
|
| 29 | 19 | $hipchatConfig['name'], |
|
| 30 | 19 | false, |
|
| 31 | 19 | $hipchatConfig['level'] |
|
| 32 | ); |
||
| 33 | // $bufferHandlerForHipchat = new \Monolog\Handler\BufferHandler($hipchatHandler); |
||
| 34 | 19 | app('log')->getMonolog()->pushHandler($hipchatHandler); |
|
| 35 | } |
||
| 36 | |||
| 37 | 19 | config([ |
|
| 38 | // |
||
| 39 | 19 | ]); |
|
| 40 | 19 | } |
|
| 41 | } |
||
| 42 |