Download the PHP package samplejunction/laravel-logger-for-teams without Composer
On this page you can find all versions of the php package samplejunction/laravel-logger-for-teams. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samplejunction/laravel-logger-for-teams
More information about samplejunction/laravel-logger-for-teams
Files in samplejunction/laravel-logger-for-teams
Package laravel-logger-for-teams
Short Description Laravel handler to sending messages to Microsoft Teams using the Incoming Webhook connector
License MIT
Informations about the package laravel-logger-for-teams
laravel-logger-for-teams
Laravel handler to sending messages to Microsoft Teams using the Incoming Webhook connector.
Installation
Require this package with composer.
Integration
Package tested and worked with Laravel and Lumen framework (5.7+). Create a custom channel using laravel logging file or create new logging config file for lumen.
Add this configuration to config/logging.php
file
or simply add name to specify different project name for each connector.
There are 2 available styles for microsoft teams message, using simple and card. You can see card style in results style which is difference from simple style.
After added configs to your config/logging.php
file, add INCOMING_WEBHOOK_URL
variable to your .env
file with connector url from your microsoft teams connector. Please read microsoft teams document to find your connector url.
Usage
To send a simple error message to teams channel, you kindly use script below:
Or you can include additional info to card message using log context.
When using simple style, log context will ignore from message.
You can also add teams
to the default stack
channel so all errors are automatically send to the teams
channel.
Results
Here are some results of notifications sent to microsoft teams channel using card style.
-
Debug log preview in microsoft teams channel
-
Info log preview in microsoft teams channel
-
Notice log preview in microsoft teams channel
-
Warning log preview in microsoft teams channel
-
Error log preview in microsoft teams channel
-
Critical log preview in microsoft teams channel
-
Alert log preview in microsoft teams channel
- Emergency log preview in microsoft teams channel
License
This laravel-teams-logging package is available under the MIT license. See the LICENSE file for more info.