PHPackages                             bushart/logtodatabase - 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. bushart/logtodatabase

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

bushart/logtodatabase
=====================

A simple modified log to database

1.0.4(4mo ago)1601MITPHP

Since May 15Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/busharthussain/laravel-log-to-database)[ Packagist](https://packagist.org/packages/bushart/logtodatabase)[ RSS](/packages/bushart-logtodatabase/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

Laravel Logs To Database
------------------------

[](#laravel-logs-to-database)

This package provides a custom log for Laravel applications that logs messages to a database table. With this package, you can easily store and query log messages in your application's database.

### Installation

[](#installation)

To install the package, simply require it using Composer:

```
composer require bushart/logtodatabase

```

Next, you should execute the log:db Artisan command

```
php artisan log:db

```

After the package is installed, you can run the migration to create the logs table in your database:

```
php artisan migrate

```

### Usage

[](#usage)

To use the custom log, add it to your config/logging.php file:

```
use bushart\logtodatabase\Log\CustomDatabaseLogger;

'channels' => [
    // ...
      'db' => [
                'driver' => 'custom',
                'via'    => CustomDatabaseLogger::class,
      ],
],

```

Then, you can log messages to the database:

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

Log::channel('db')->info('Your message test',['user_id'=>1]);

Log::channel('db')->error('Your error message',['user_id'=>1]);

Log::channel('db')->warning('Your warning message ',['user_id'=>1]);

```

This will log the message to the logs table in your database.

### Support

[](#support)

If you encounter any issues with this package, please open an issue on the GitHub repository or contact us at .

I hope this example description helps you write your own README file! Let me know if you have any other questions.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance74

Regular maintenance activity

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~237 days

Total

5

Last Release

146d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c8f197be03f87ca7ebfb567da963b7310d8cf259148758fac79345b24a567f1?d=identicon)[busharthussain](/maintainers/busharthussain)

---

Top Contributors

[![busharthussain](https://avatars.githubusercontent.com/u/12028370?v=4)](https://github.com/busharthussain "busharthussain (5 commits)")[![ar207](https://avatars.githubusercontent.com/u/79445165?v=4)](https://github.com/ar207 "ar207 (1 commits)")

### Embed Badge

![Health badge](/badges/bushart-logtodatabase/health.svg)

```
[![Health](https://phpackages.com/badges/bushart-logtodatabase/health.svg)](https://phpackages.com/packages/bushart-logtodatabase)
```

###  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)
