PHPackages                             pagevamp/laravel-stack-driver-logger - 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. pagevamp/laravel-stack-driver-logger

ActiveLibrary

pagevamp/laravel-stack-driver-logger
====================================

v1.0.3(8y ago)48.4k1[1 issues](https://github.com/s4jj4n/laravel-stack-driver-logger/issues)MITPHPPHP &gt;=5.4

Since Mar 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/s4jj4n/laravel-stack-driver-logger)[ Packagist](https://packagist.org/packages/pagevamp/laravel-stack-driver-logger)[ RSS](/packages/pagevamp-laravel-stack-driver-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

Laravel Stack Driver Logger
===========================

[](#laravel-stack-driver-logger)

Google Cloud Stack Driver error monitoring integration for Laravel projects. This library adds a listener to Laravel's logging component. Laravel's session information will be sent in to Stack Driver, as well as some other helpful information such as 'environment', 'server', and 'session'.

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

[](#installation)

Install using composer:

```
composer require pagevamp/laravel-stack-driver-logger

```

Add the service provider to the `'providers'` array in `config/app.php`:

```
Pagevamp\Providers\StackDriverLoggerServiceProvider::class,
```

If you only want to enable Stack Driver reporting for certain environments you can conditionally load the service provider in your `AppServiceProvider`:

```
    public function register()
    {
        if ($this->app->environment('production')) {
            $this->app->register(\Pagevamp\Providers\StackDriverLoggerServiceProvider::class);
        }
    }
```

Configuration
-------------

[](#configuration)

This package supports configuration through the services configuration file located in `config/services.php`. All configuration variables will be directly passed to Stack Driver:

```
'stack_driver_logger' => [
    'credentials' => [
        'keyFile' => json_decode(trim(env('GC_LOG_SERVICE_CRED'), "'"), 1),
    ],
    'log_name' => env('GC_LOG_NAME', 'builder-log'),
],
```

Usage
-----

[](#usage)

To automatically monitor exceptions, simply use the `Log` facade in your error handler in `app/Exceptions/Handler.php`:

```
public function report(Exception $exception)
{
    \Log::error($exception); //Stack Driver
    parent::report($exception);
}
```

Your other log messages will also be sent to Stack Driver:

```
\Log::debug('Here is some debug information');
```

*NOTE*: Fatal exceptions will always be sent to Stack Driver.

### Context informaton

[](#context-informaton)

You can pass user information as context like this:

```
\Log::error('Something went wrong', [
    'person' => ['id' => 123, 'username' => 'John Doe', 'email' => 'john@doe.com']
]);
```

Or pass some extra information:

```
\Log::warning('Something went wrong', [
    'download_size' => 3432425235
]);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~1 days

Total

5

Last Release

2965d ago

Major Versions

0.0.1 → v1.0.02018-03-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c904da34238564b9fc6bef99d9d698727a353ba0b3a4175a1b3ed9c72eeecf5?d=identicon)[developernaren](/maintainers/developernaren)

---

Top Contributors

[![sajjanstha](https://avatars.githubusercontent.com/u/20639680?v=4)](https://github.com/sajjanstha "sajjanstha (2 commits)")

### Embed Badge

![Health badge](/badges/pagevamp-laravel-stack-driver-logger/health.svg)

```
[![Health](https://phpackages.com/badges/pagevamp-laravel-stack-driver-logger/health.svg)](https://phpackages.com/packages/pagevamp-laravel-stack-driver-logger)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

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