https://github.com/viniciuswebdev/monolog-mattermost
Monolog Handler to send log messages to Mattermost channels using Incoming Webhook Integration.
https://github.com/viniciuswebdev/monolog-mattermost
mattermost mattermost-api mattermost-chat monolog monolog-handler php php7
Last synced: 6 months ago
JSON representation
Monolog Handler to send log messages to Mattermost channels using Incoming Webhook Integration.
- Host: GitHub
- URL: https://github.com/viniciuswebdev/monolog-mattermost
- Owner: viniciuswebdev
- License: mit
- Created: 2017-06-01T23:15:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-03T14:41:12.000Z (about 9 years ago)
- Last Synced: 2025-10-23T05:51:24.456Z (8 months ago)
- Topics: mattermost, mattermost-api, mattermost-chat, monolog, monolog-handler, php, php7
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Monolog Mattermost Handler


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](https://github.com/Seldaek/monolog).
## Instalation
```
composer require "viniciuswebdev/monolog-mattermost:1.0.0"
```
## Code example
```php
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](https://opensource.org/licenses/MIT) License (MIT).