PHP code example of martinusso / monolog-rocketchat-handler
1. Go to this page and download the library: Download martinusso/monolog-rocketchat-handler library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
martinusso / monolog-rocketchat-handler example snippets
$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);
$rocketChatHandler = new RocketChatHandler\RocketChatHandler(
[
'https://rocket.chat.local/hooks/bd97pizfGu3S5q5oT/SmCgGWSc4vEuRyBu5eocnBDDKvZvoqL6whRKpvsBK2TjvNk2',
'https://rocket.chat.server/hooks/bd97pizfGu3S5q5oT/SmCgGWSc4vEuRyBu5eocnBDDKvZvoqL6whRKpvsBK2TjvNk2',
// ...
],
Monolog\Logger::DEBUG
);
// ...