Skip to content

mhdev90/monolog-rocketchat-handler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monolog-rocketchat-handler

Scrutinizer Code Quality Code Intelligence Status

License Latest Stable Version Latest Unstable Version composer.lock Total Downloads

Installation

composer require martinusso/monolog-rocketchat-handler

Usage

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
);

// ...

License

This software is open source, licensed under the The MIT License (MIT). See LICENSE for details.

About

A Monolog handler for Rocket.Chat webhooks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%