PHP code example of exileed / rocketchat-monolog
1. Go to this page and download the library: Download exileed/rocketchat-monolog 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/ */
exileed / rocketchat-monolog example snippets
php
$webhook = 'https://rocket.chat.local/hooks/bd97pizfGu3S5q5oT/ggdfhryhge';
$channelId = '12345';
$rocketChatHandler = new RocketChatHandler\RocketChatHandler([$webhook], $channelId);
$monolog = new Monolog\Logger('Rocket.Chat');
$monolog->pushHandler($rocketChatHandler);