procergs / rocketchat-monolog-handler
Installs: 5 039
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 7
Forks: 2
Open Issues: 1
Requires
- php: >=5.4
- guzzlehttp/guzzle: ^6
- monolog/monolog: ^1
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^0.9.2
- phpunit/phpunit: ^5
This package is auto-updated.
Last update: 2024-12-12 05:19:09 UTC
README
A monolog handler that sends logs to a Rocket.Chat WebHook URL.
use Monolog\Logger; use PROCERGS\Handler\RocketChatHandler; $url = 'https://demo.rocket.chat/hooks/p2FPjabaKRMucOPxV/eyN8tKpRII2H62Z8k189O7DP9nznU1I2xr0DmmkyeWTkQqs0'; $channel = 'my-channel'; $username = 'Some.User'; $logger = new Logger('my_logger'); $logger->pushHandler(new RocketChatHandler($url, $channel, $username)); $logger->crit('Something');