PHPackages                             meetfree/laravel-mysql-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. meetfree/laravel-mysql-log

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

meetfree/laravel-mysql-log
==========================

Laravel 8 MySQL driver for Monolog

05PHP

Since Jun 14Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Monolog MySQL Handler.
------------------------------

[](#laravel-monolog-mysql-handler)

This package will log errors into MySQL database instead storage/log/laravel.log file.

### Installation

[](#installation)

```
composer require markhilton/monolog-mysql
```

Open up `config/app.php` and find the `providers` key.

```
'providers' => array(
    // ...
    Logger\Laravel\Provider\MonologMysqlHandlerServiceProvider::class,
);
```

Publish config using Laravel Artisan CLI.

```
php artisan vendor:publish
```

Migrate tables - you may want to [configure enviornment](#environment-configuration) beforehand.

```
php artisan migrate
```

Application Integration
-----------------------

[](#application-integration)

In your application `config/logging.php` add:

```
use Logger\Monolog\Handler\MysqlHandler;

// ...

'channels' => [
    // ...
    'mysql' => [
        'driver' => 'monolog',
        'handler' => MysqlHandler::class,
        'level' => 'debug',
    ],
];
```

Application Integration (Laravel &gt;= 5.6)
===========================================

[](#application-integration-laravel--56)

In your application `config/logging.php` add:

```
