PHPackages                             osi-open-source/laravel-teams-logging - 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. osi-open-source/laravel-teams-logging

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

osi-open-source/laravel-teams-logging
=====================================

Laravel handler to sending messages to Microsoft Teams using the Incoming Webhook connector

v2.0.1(5y ago)236.8k—3.3%1MITPHPPHP &gt;=7.1

Since Oct 25Pushed 5y agoCompare

[ Source](https://github.com/osi-open-source/laravel-teams-logging)[ Packagist](https://packagist.org/packages/osi-open-source/laravel-teams-logging)[ RSS](/packages/osi-open-source-laravel-teams-logging/feed)WikiDiscussions master Synced 1mo ago

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

laravel-teams-logging
=====================

[](#laravel-teams-logging)

[![Latest Version on Packagist](https://camo.githubusercontent.com/75889cc04742af169bf127899f99daafab689170bebf04f2d57b05f96251d7bd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f73692d6f70656e2d736f757263652f6c61726176656c2d7465616d732d6c6f6767696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/osi-open-source/laravel-teams-logging)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/ae632e10994277cca9866a6bbd618b102f4d7b9b88745d94ea9c6885e95493ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f73692d6f70656e2d736f757263652f6c61726176656c2d7465616d732d6c6f6767696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/osi-open-source/laravel-teams-logging)

Laravel handler to sending messages to Microsoft Teams using the Incoming Webhook connector.

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

[](#installation)

Require this package with composer.

```
$ composer require osi-open-source/laravel-teams-logging
```

Integration
-----------

[](#integration)

Package tested and worked with Laravel and Lumen framework (5.7+).

**Laravel**: After installation using composer finishes up, you'll have to add the following line to your `config/app.php`:

```
\OsiOpenSource\LaravelTeamsLogging\LoggerServiceProvider::class;
```

**Lumen**: For Lumen, you'll have to add the following line to your `bootstrap/app.php`:

```
$app->register(\OsiOpenSource\LaravelTeamsLogging\LoggerServiceProvider::class);
```

**Laravel**: Then copy `teams` config file from laravel-teams-logging to your config folder:

```
$ php artisan vendor:publish --provider="OsiOpenSource\LaravelTeamsLogging\LoggerServiceProvider"
```

**Lumen**: For Lumen, you need to copy file manually to your config folder and enable it in `bootstrap/app.php`:

```
$app->configure('teams');
```

Create a [custom channel](https://laravel.com/docs/master/logging#creating-custom-channels) using laravel logging file or create new logging config file for lumen.

Add this configuration to `config/logging.php` file

```
'teams' => [
    'driver'    => 'custom',
    'via'       => \OsiOpenSource\LaravelTeamsLogging\LoggerChannel::class,
    'level'     => 'debug',
    'url'       => env('INCOMING_WEBHOOK_URL'),
    'style'     => 'simple',    // Available style is 'simple' and 'card', default is 'simple'
],
```

or simply add name to specify different project name for each connector.

```
'teams' => [
    'driver'    => 'custom',
    'via'       => \OsiOpenSource\LaravelTeamsLogging\LoggerChannel::class,
    'level'     => 'debug',
    'url'       => env('INCOMING_WEBHOOK_URL'),
    'style'     => 'simple',    // Available style is 'simple' and 'card', default is 'simple'
    'name'      => 'Dummy Project'
],
```

You can add different message data using LineLogger format param

```
'teams' => [
    'driver'    => 'custom',
    'via'       => \OsiOpenSource\LaravelTeamsLogging\LoggerChannel::class,
    'level'     => 'debug',
    'url'       => env('INCOMING_WEBHOOK_URL'),
    'style'     => 'simple',    // Available style is 'simple' and 'card', default is 'simple'
    'name'      => 'Dummy Project',
    'format'    => \OsiOpenSource\LaravelTeamsLogging\LoggerHandler::ADVANCED_FORMAT, //%message% %context% %extra%
],
```

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](https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors/connectors-using) document to find your connector url.

Usage
-----

[](#usage)

To send a simple error message to teams channel, you kindly use script below:

```
Log::channel('teams')->error('Error message');
```

Or you can include additional info to card message using log context.

```
Log::channel('teams')->error('Error message', [
    'Assigned to' => 'Unassigned'
]);
```

You can also add `teams` to the default `stack` channel so all errors are automatically send to the `teams` channel.

```
'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'teams'],
    ],
],
```

Results
-------

[](#results)

Here are some results of notifications sent to microsoft teams channel using card style.

- Debug log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-1debug.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-1debug.png)
- Info log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-2info.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-2info.png)
- Notice log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-3notice.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-3notice.png)
- Warning log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-4warning.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-4warning.png)
- Error log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-5error.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-5error.png)
- Critical log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-6critical.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-6critical.png)
- Alert log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-7alert.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-7alert.png)
- Emergency log preview in microsoft teams channel [![Screenshot](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-8emergency.png)](https://raw.githubusercontent.com/osi-open-source/laravel-teams-logging/master/assets/ltl-8emergency.png)

License
-------

[](#license)

This laravel-teams-logging package is available under the MIT license. See the LICENSE file for more info.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~62 days

Recently: every ~93 days

Total

13

Last Release

2020d ago

Major Versions

v0.1.1 → v1.0.02018-10-25

v1.2.2 → v2.0.02020-11-04

PHP version history (2 changes)v0.1.0PHP ^7.0

v2.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/55447902?v=4)[OSI](/maintainers/osi-open-source)[@osi-open-source](https://github.com/osi-open-source)

---

Top Contributors

[![stampubolon](https://avatars.githubusercontent.com/u/37098202?v=4)](https://github.com/stampubolon "stampubolon (10 commits)")[![margatampu](https://avatars.githubusercontent.com/u/3712334?v=4)](https://github.com/margatampu "margatampu (9 commits)")[![ibpavlov](https://avatars.githubusercontent.com/u/3340235?v=4)](https://github.com/ibpavlov "ibpavlov (4 commits)")[![lazarinayotova](https://avatars.githubusercontent.com/u/260863019?v=4)](https://github.com/lazarinayotova "lazarinayotova (2 commits)")[![sh-ogawa](https://avatars.githubusercontent.com/u/9303287?v=4)](https://github.com/sh-ogawa "sh-ogawa (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/osi-open-source-laravel-teams-logging/health.svg)

```
[![Health](https://phpackages.com/badges/osi-open-source-laravel-teams-logging/health.svg)](https://phpackages.com/packages/osi-open-source-laravel-teams-logging)
```

###  Alternatives

[illuminate/log

The Illuminate Log package.

6224.3M518](/packages/illuminate-log)[freshbitsweb/laravel-log-enhancer

Make debugging easier by adding more data to your laravel logs

346569.0k](/packages/freshbitsweb-laravel-log-enhancer)[honeybadger-io/honeybadger-laravel

Honeybadger Laravel integration

431.2M](/packages/honeybadger-io-honeybadger-laravel)[ytake/laravel-fluent-logger

fluent logger for laravel and lumen

63541.6k1](/packages/ytake-laravel-fluent-logger)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[shaffe/laravel-mail-log-channel

A package to support logging via email in Laravel

1286.2k](/packages/shaffe-laravel-mail-log-channel)

PHPackages © 2026

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