samirraihan / laravel-microsoft-teams-logger
Laravel logger that sends logs to Microsoft Teams via webhook.
v1.0.0
2025-05-29 08:11 UTC
Requires
- php: ^8.1
- monolog/monolog: ^3.0
This package is auto-updated.
Last update: 2025-05-29 08:51:50 UTC
README
A Laravel-compatible logger that sends messages to a Microsoft Teams webhook using Monolog.
Installation
composer require samirraihan/laravel-microsoft-teams-logger
Laravel Integration
Publish Configuration File
php artisan vendor:publish --tag=config
Set Environment Variables
TEAMS_WEBHOOK_URL= TEAMS_LOG_LEVEL=error
Add Custom Logging Channel (config/logging.php -> channels)
'stack' => [ 'driver' => 'stack', 'channels' => ['single', 'teams'], 'ignore_exceptions' => false, ], 'teams' => [ 'driver' => 'custom', 'via' => MicrosoftTeamsLogger\TeamsLoggerFactory::class, 'level' => env('TEAMS_LOG_LEVEL', 'error'), 'webhookUrl' => env('TEAMS_WEBHOOK_URL'), ],