viniciuswebdev / monolog-mattermost
Handle logs to Mattermost
Installs: 76 965
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- guzzlehttp/guzzle: ^6.1
- monolog/monolog: ~1.22
Requires (Dev)
- phpunit/phpunit: ^5.6
This package is not auto-updated.
Last update: 2024-04-14 00:38:55 UTC
README
This Handler may be useful if you need send log messages to Mattermost channels, it's very easy to setup and integrate in your application if you are using Monolog.
Instalation
composer require "viniciuswebdev/monolog-mattermost:1.0.0"
Code example
use Monolog\Logger; $logger = new Logger('application'); $logger->pushHandler(new MattermostHandler('https://mattermost.my-company.net.br/hooks/xxx')); $logger->info('Your message here!');
How to get my Webhook url?
Just follow these few steps:
- Go to Integrations item on main menu
- Incoming Webhook
- Add Incoming Webhook
- Chose a name, description and the desired channel to publish
- Get the URL to use in the Handler constructor
License
The MIT License (MIT).