composer require martinusso/monolog-rocketchat-handler
Push this handler to your Monolog instance:
$webhook = 'https://rocket.chat.local/hooks/bd97pizfGu3S5q5oT/SmCgGWSc4vEuRyBu5eocnBDDKvZvoqL6whRKpvsBK2TjvNk2';
$rocketChatHandler = new RocketChatHandler\RocketChatHandler([$webhook], Monolog\Logger::DEBUG);
$monolog = new Monolog\Logger('Rocket.Chat');
$monolog->pushHandler($rocketChatHandler);
Supports multiple webhook URLs:
$rocketChatHandler = new RocketChatHandler\RocketChatHandler(
[
'https://rocket.chat.local/hooks/bd97pizfGu3S5q5oT/SmCgGWSc4vEuRyBu5eocnBDDKvZvoqL6whRKpvsBK2TjvNk2',
'https://rocket.chat.server/hooks/bd97pizfGu3S5q5oT/SmCgGWSc4vEuRyBu5eocnBDDKvZvoqL6whRKpvsBK2TjvNk2',
// ...
],
Monolog\Logger::DEBUG
);
// ...
This software is open source, licensed under the The MIT License (MIT). See LICENSE for details.