PHPackages                             marick/laravel-google-cloud-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. marick/laravel-google-cloud-logging

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

marick/laravel-google-cloud-logging
===================================

v2.0.0(1y ago)126.5k↑50%[1 PRs](https://github.com/marickvantuil/laravel-google-cloud-logging/pulls)MITPHPCI passing

Since Apr 25Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/marickvantuil/laravel-google-cloud-logging)[ Packagist](https://packagist.org/packages/marick/laravel-google-cloud-logging)[ GitHub Sponsors](https://github.com/marickvantuil)[ RSS](/packages/marick-laravel-google-cloud-logging/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (11)Used By (0)

Companion packages: [Cloud Scheduler](https://github.com/stackkit/laravel-google-cloud-scheduler), [Cloud Tasks](https://github.com/stackkit/laravel-google-cloud-tasks-queue)

Introduction
============

[](#introduction)

This package lets you use Google Cloud Logging as the log driver for Laravel.

The package will automatically detect the environment it's running in (currently supports Cloud Run or App Engine), and attach the correct labels to the log entry so the logs appear in the application service.

Installation
============

[](#installation)

Install the package with Composer:

```
composer require marick/laravel-google-cloud-logging
```

Add a new logging channel in `config/logging.php`:

```
'google_cloud' => [
    'driver' => 'google_cloud',
    'location' => env('GOOGLE_CLOUD_LOGGING_LOCATION'),
],
```

Use the new channel:

```
LOG_CHANNEL=google_cloud
```

Important

A location is mandatory to make log entries appear in Cloud Run or App Engine.

How to
======

[](#how-to)

Use log context
---------------

[](#use-log-context)

```
use Illuminate\Support\Facades\Log;

Log::debug('user logged in', [
    'user' => 5,
]);
```

The above context will be added in Cloud Logging:

```
{
  "jsonPayload": {
    "message": "user logged in"
  },
  "labels": {
    "user": 5
  }
}
```

Use `Context`
-------------

[](#use-context)

```
use Illuminate\Support\Facades\Context;
use Illuminate\Support\Facades\Log;

Context::add('user', 5);

Log::alert('user logged in');
```

The above context will be added in Cloud Logging:

```
{
  "jsonPayload": {
    "message": "user logged in"
  },
  "labels": {
    "user": 5
  }
}
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance70

Regular maintenance activity

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~45 days

Recently: every ~78 days

Total

8

Last Release

438d ago

Major Versions

v1.0.0 → v2.0.02025-03-06

### Community

Maintainers

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

---

Top Contributors

[![marickvantuil](https://avatars.githubusercontent.com/u/647007?v=4)](https://github.com/marickvantuil "marickvantuil (36 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/marick-laravel-google-cloud-logging/health.svg)

```
[![Health](https://phpackages.com/badges/marick-laravel-google-cloud-logging/health.svg)](https://phpackages.com/packages/marick-laravel-google-cloud-logging)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[google/cloud-error-reporting

Stackdriver Error Reporting Client for PHP

204.2M24](/packages/google-cloud-error-reporting)

PHPackages © 2026

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