Download the PHP package zanysoft/laravel-teams-logging without Composer
On this page you can find all versions of the php package zanysoft/laravel-teams-logging. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zanysoft/laravel-teams-logging
More information about zanysoft/laravel-teams-logging
Files in zanysoft/laravel-teams-logging
Package laravel-teams-logging
Short Description Laravel handler to sending messages to Microsoft Teams using the Incoming Webhook connector
License MIT
Informations about the package laravel-teams-logging
Laravel Teams Logging
A Laravel logging channel that sends application log messages directly to Microsoft Teams using an Incoming Webhook.
Features
- Supports Laravel and Lumen
- Supports all Laravel log levels
- Compatible with Laravel's
stacklogging channel - Two message styles:
- Simple – lightweight notifications
- Card – rich formatted messages with context
- Application/project name (Optional)
Installation
Install the package via Composer:
Laravel
Register the service provider in config/app.php if required:
Publish the configuration file:
Lumen
Register the service provider in bootstrap/app.php:
Copy the package configuration file to your application's config directory, then enable it in bootstrap/app.php:
Configuration
Create a custom logging channel in config/logging.php:
Environment
Add folloing details to your .env file:
- Message title (default value is APP_NAME)
- Message style (default simple).
- Microsoft Teams Incoming Webhook URL
For instructions on creating an Incoming Webhook, refer to the Microsoft Teams documentation.
Message Styles
The package supports two message styles:
Simple (Default)
Sends only the log message. (no context)
Card
Displays a rich Teams card containing:
- Log level
- Message
- Timestamp
- Application name
- Additional log context
Usage
Log a simple message:
Log a message with additional context:
Note: Log context is only included when using the card style.
Using the Stack Channel
To automatically send all application logs to Microsoft Teams, add the teams channel to your default logging stack:
Screenshots
Examples of log messages displayed in Microsoft Teams using the card style.
Debug
Error
Warning
Critical
License
This package is open-source software licensed under the MIT License.
See the LICENSE file for more information.
All versions of laravel-teams-logging with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
monolog/monolog Version ^3.0