laravel-microsoft-teams-logger maintained by samirraihan
Samir Raihan Laravel Microsoft Teams Logger
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'),
],