novaday-co / laravel-rocket-chat-debugher
Laravel Rocket chat Debugher, push all logs to rocket chat channels
Installs: 76
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- jenssegers/agent: ^2.6
This package is auto-updated.
Last update: 2024-11-19 12:19:03 UTC
README
First you need to set your channel url to config/debugher.php
return [ 'end_point' => YOUR_ROCKET_CHAT_CHANNEL_URL_WITH_TOKEN, 'channel_name' => YOUR_ROCKET_CHAT_CHANNEL_Name, ];
Then you need to import Logger to Exceptions/Handler.php
use Novaday\Debugher\Logger;
Finally, put the following code to Exceptions/Handler.php where ever you need to push log
resolve(Logger::class) ->fromUser(auth()->user()) ->withIp(request()->ip()) ->withException($exception) ->send();