PHPackages                             fl0od13/monolog-mysql - 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. [Database &amp; ORM](/categories/database)
4. /
5. fl0od13/monolog-mysql

ActiveLibrary[Database &amp; ORM](/categories/database)

fl0od13/monolog-mysql
=====================

Laravel 8 MySQL driver for Monolog

0.2.2(4y ago)04MITPHPPHP ^7.0

Since Apr 7Pushed 4y agoCompare

[ Source](https://github.com/FL0od13/monolog-mysql)[ Packagist](https://packagist.org/packages/fl0od13/monolog-mysql)[ Docs](https://github.com/FL0od13/monolog-mysql)[ RSS](/packages/fl0od13-monolog-mysql/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)DependenciesVersions (14)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:

```
