PHPackages                             khanhduv4/laravel-log-db - 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. khanhduv4/laravel-log-db

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

khanhduv4/laravel-log-db
========================

A database driver for logging with Laravel

09PHP

Since Oct 3Pushed 3y agoCompare

[ Source](https://github.com/khanhduv4/laravel-log-db)[ Packagist](https://packagist.org/packages/khanhduv4/laravel-log-db)[ RSS](/packages/khanhduv4-laravel-log-db/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://camo.githubusercontent.com/2bedf63f24cda7efab02da955dc11fb7ef8a060e2f26b73c33a7aac84529b8a3/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f737570706f72742d756b7261696e652e7376673f743d31)](https://supportukrainenow.org)

Laravel Database Logger
=======================

[](#laravel-database-logger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4c7b7e5036b5d19c2d8c4e503dee582699dc5eee12c5b761b356bae76f0b5c23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796f657269626f76656e2f6c61726176656c2d6c6f672d64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yoeriboven/laravel-log-db)[![GitHub Tests Action Status](https://camo.githubusercontent.com/53b1513e0e3316b8c701f53d520e62a72f72dad42c8859996f3ff30cf94f02ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f796f657269626f76656e2f6c61726176656c2d6c6f672d64622f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/yoeriboven/laravel-log-db/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/56af3ef4edac8f17f695ef03133107bdca40e0941aadc5ab94b32c6ee6e49651/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f796f657269626f76656e2f6c61726176656c2d6c6f672d64622f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/yoeriboven/laravel-log-db/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/7cdb0d6efbcf5b4ff151a0665e7a7d5a3a56519bd05c2db41bb5f0d88485a0d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796f657269626f76656e2f6c61726176656c2d6c6f672d64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yoeriboven/laravel-log-db)

This package provides a driver to store log messages in the database.

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

Log::channel('db')->info('Your message');
```

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

[](#installation)

You can install the package via composer:

```
composer require yoeriboven/laravel-log-db
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="log-db-migrations"
php artisan migrate
```

Now add a new channel to `config/logging.php`.

```
use Yoeriboven\LaravelLogDb\DatabaseLogger;

return [
    'channels' => [
        'db' => [
            'driver' => 'custom',
            'via'    => DatabaseLogger::class,
        ],
    ]
]
```

Usage
-----

[](#usage)

You could add the `db` channel to the `stack` channel and then log the normal way.

You could also explicitly log to the database:

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

Log::channel('db')->info('Your message');
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Yoeri Boven](https://twitter.com/yoeriboven)

License
-------

[](#license)

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

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

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

---

Top Contributors

[![yoeriboven](https://avatars.githubusercontent.com/u/4047804?v=4)](https://github.com/yoeriboven "yoeriboven (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![khanhduv4](https://avatars.githubusercontent.com/u/38208900?v=4)](https://github.com/khanhduv4 "khanhduv4 (2 commits)")

### Embed Badge

![Health badge](/badges/khanhduv4-laravel-log-db/health.svg)

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

###  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)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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