PHPackages                             leovince/monolog-teams - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. leovince/monolog-teams

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

leovince/monolog-teams
======================

Monolog handler for sending log messages to Microsoft Teams channels via Workflows.

v1.0.0(1mo ago)0110↑36.4%MITPHPPHP ^8.3CI passing

Since May 5Pushed 1mo agoCompare

[ Source](https://github.com/LeoVince-com/monolog-teams)[ Packagist](https://packagist.org/packages/leovince/monolog-teams)[ Docs](https://github.com/LeoVince-com/monolog-teams)[ RSS](/packages/leovince-monolog-teams/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Monolog Teams
=============

[](#monolog-teams)

This package provides a Monolog handler that delivers log records to a Microsoft Teams channel by calling an **HTTP endpoint generated by a Teams Workflow**.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require leovince/monolog-teams
```

### Configuring Workflows on Microsoft Teams

[](#configuring-workflows-on-microsoft-teams)

- In Microsoft Teams, open the **Team** that contains the channel intended to receive log messages.
- Add the **Workflows** app to the team if it is not already installed.
- Open the **Workflows** app and create a new workflow.
- Choose the template **“Send webhook alerts to a channel”**.
- When prompted, select the **Team** and **Channel** where messages should be posted.
- The workflow will generate a unique **HTTP POST URL**.

Usage
-----

[](#usage)

```
use LeoVince\MonologTeams\TeamsHandler;
use Monolog\Level;
use Monolog\Logger;

// Create the logger
$log = new Logger('my_logger');
$log->pushHandler(new TeamsHandler('LOG_TEAMS_WEBHOOK_URL', 'APP_NAME', level: Level::Error));

// Use the logger
$log->error('Error message');
```

Usage with Laravel
------------------

[](#usage-with-laravel)

Add to `config/logging.php` the following configuration under the `channels` key:

```
'teams' => [
    'driver'  => 'monolog',
    'handler' => LeoVince\MonologTeams\TeamsHandler::class,
    'level' => env('LOG_LEVEL', 'error'),
    'handler_with' => [
        'webhookUrl' => env('LOG_TEAMS_WEBHOOK_URL'),
        'name' => env('APP_NAME', 'Laravel'),
        'includeContextAndExtra' => true,
    ],
],
```

Add to `.env` the following variable:

```
LOG_TEAMS_WEBHOOK_URL=LOG_TEAMS_WEBHOOK_URL
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Fabio Cagliero](https://github.com/fab120)
- [Jakub Łuczkiewicz](https://github.com/JakubLuczkiewicz)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance93

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

34d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bee6fac3ff235d06469b2a8a3afa880ec3e48807f520fa2b98fb9f8a761bcc16?d=identicon)[fab120](/maintainers/fab120)

---

Top Contributors

[![fab120](https://avatars.githubusercontent.com/u/293368?v=4)](https://github.com/fab120 "fab120 (10 commits)")[![JakubLuczkiewicz](https://avatars.githubusercontent.com/u/125896311?v=4)](https://github.com/JakubLuczkiewicz "JakubLuczkiewicz (2 commits)")

---

Tags

monologteamsworkflowslogworkflowTeams

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/leovince-monolog-teams/health.svg)

```
[![Health](https://phpackages.com/badges/leovince-monolog-teams/health.svg)](https://phpackages.com/packages/leovince-monolog-teams)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k240.0M312](/packages/sentry-sentry)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[illuminate/log

The Illuminate Log package.

6425.0M597](/packages/illuminate-log)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
