PHPackages                             theriddleofenigma/laravel-google-chat-log - 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. theriddleofenigma/laravel-google-chat-log

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

theriddleofenigma/laravel-google-chat-log
=========================================

Brings up the option for sending the logs to google chat \[Google Workplace formerly called GSuite\].

v2.1.0(11mo ago)2458.6k↓15.9%6[1 issues](https://github.com/theriddleofenigma/laravel-google-chat-log/issues)MITPHPPHP ^8.1CI passing

Since Feb 21Pushed 11mo ago3 watchersCompare

[ Source](https://github.com/theriddleofenigma/laravel-google-chat-log)[ Packagist](https://packagist.org/packages/theriddleofenigma/laravel-google-chat-log)[ Fund](https://www.buymeacoffee.com/riddleofenigma)[ RSS](/packages/theriddleofenigma-laravel-google-chat-log/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (12)Used By (0)

`♥ Made with  And I love `

Laravel Google Chat Log
=======================

[](#laravel-google-chat-log)

Brings up the option for sending the logs to google chat \[Google Workspace formerly called GSuite\] from [Laravel](https://laravel.com)/[Lumen](https://lumen.laravel.com).

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

[](#installation)

### Composer install

[](#composer-install)

```
composer require theriddleofenigma/laravel-google-chat-log
```

For laravel 9.x or lower, please use v1.x

```
composer require theriddleofenigma/laravel-google-chat-log:^1.3
```

Add the following code to the channels array in `config/logging.php` in your laravel/lumen application.

```
'google-chat' => [
    'driver' => 'monolog',
    'url' => env('LOG_GOOGLE_CHAT_WEBHOOK_URL'),
    'notify_users' => [
        'default' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_DEFAULT'),
        'emergency' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_EMERGENCY'),
        'alert' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_ALERT'),
        'critical' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_CRITICAL'),
        'error' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_ERROR'),
        'warning' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_WARNING'),
        'notice' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_NOTICE'),
        'info' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_INFO'),
        'debug' => env('LOG_GOOGLE_CHAT_NOTIFY_USER_ID_DEBUG'),
    ],
    'level' => env('LOG_LEVEL', 'debug'),
    'handler' => \Enigma\GoogleChatHandler::class,
],
```

You can provide the eight logging levels defined in the [RFC 5424 specification](https://tools.ietf.org/html/rfc5424): `emergency`, `alert`, `critical`, `error`, `warning`, `notice`, `info`, and `debug`

**Note\*:** Make sure to set the **LOG\_GOOGLE\_CHAT\_WEBHOOK\_URL** env variable. And all other **LOG\_GOOGLE\_CHAT\_NOTIFY\_USER\_ID** are optional. Here, you can set multiple google chat webhook url as comma separated value for the **LOG\_GOOGLE\_CHAT\_WEBHOOK\_URL** env variable.

**Note\*:** For lumen, make sure the `$app->withFacades();` is uncommented in the **bootstrap/app.php**.

Now, you can notify a specific user with `@mention` in the error log by setting the corresponding USER\_ID to the `LOG_GOOGLE_CHAT_NOTIFY_USER_ID_DEFAULT` env variable. User Ids mapped under `LOG_GOOGLE_CHAT_NOTIFY_USER_ID_DEFAULT` will be notified for all log levels.

For getting the **USER\_ID**, right-click the user-icon of the person whom you want to notify in the Google chat from your browser window and select inspect. Under the `div` element find the attribute data\_member\_id, then the USER\_ID can be found as `data-member-id="user/human/{USER_ID}>"`.

In order to notify all the users like `@all`, Set `LOG_GOOGLE_CHAT_NOTIFY_USER_ID_DEFAULT=all`. Also, you can set multiple USER\_IDs as comma separated value. In order to notify different users for different log levels, you can set the corresponding env keys mentioned to configure in the `logging.php` file.

Now, you can add custom additional logs to the Google chat message by passing a closure function to the GoogleChatHandler::$additionalLogs property.

```
use Enigma\GoogleChatHandler;
use Illuminate\Http\Request;

class AppServiceProvider {
    public function register() {}
    public function boot() {
        GoogleChatHandler::$additionalLogs = function () {
            return [
                'tenant' => request()->user()?->tenant->name,
                'request' => json_encode(request()->toArray()),
            ];
        };
    }
}
```

License
-------

[](#license)

Copyright © Kumaravel

Laravel Google Chat Log is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance50

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% 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

Every ~155 days

Recently: every ~162 days

Total

11

Last Release

358d ago

Major Versions

v1.3.0 → v2.0.02024-01-27

PHP version history (2 changes)v1.0.0PHP ^7.3|^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/78fdf9bceef9ac86b4cb041802ade60afec5fc1235cf97cc582deac2ce2dadb8?d=identicon)[theriddleofenigma](/maintainers/theriddleofenigma)

---

Top Contributors

[![theriddleofenigma](https://avatars.githubusercontent.com/u/29883026?v=4)](https://github.com/theriddleofenigma "theriddleofenigma (40 commits)")[![dandevweb](https://avatars.githubusercontent.com/u/94933102?v=4)](https://github.com/dandevweb "dandevweb (1 commits)")

---

Tags

error-logginggoogle-chatgsuitelaravellaravel-logslogslumen

### Embed Badge

![Health badge](/badges/theriddleofenigma-laravel-google-chat-log/health.svg)

```
[![Health](https://phpackages.com/badges/theriddleofenigma-laravel-google-chat-log/health.svg)](https://phpackages.com/packages/theriddleofenigma-laravel-google-chat-log)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[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)[marvinlabs/laravel-discord-logger

Logging to a discord channel in Laravel

2081.1M2](/packages/marvinlabs-laravel-discord-logger)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[honeybadger-io/honeybadger-laravel

Honeybadger Laravel integration

431.2M](/packages/honeybadger-io-honeybadger-laravel)

PHPackages © 2026

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