Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kemalyen/dblogger
A Log Handler for Monolog and Laravel PHP Framework
https://github.com/kemalyen/dblogger
Last synced: about 2 months ago
JSON representation
A Log Handler for Monolog and Laravel PHP Framework
- Host: GitHub
- URL: https://github.com/kemalyen/dblogger
- Owner: kemalyen
- Created: 2016-02-01T14:25:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-10T11:19:29.000Z (over 8 years ago)
- Last Synced: 2023-08-30T16:31:16.874Z (over 1 year ago)
- Language: PHP
- Homepage: http://www.gazatem.com
- Size: 18.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## This package has been renamed and moved to Glog
I've decided to put Gui and library into a standalone package. This will be helpful for development and testing.
[https://github.com/gazatem/glog](https://github.com/gazatem/glog)
### A Log Handler for Monolog and Laravel PHP Framework
### Installation
Add the following to your composer.json and run `composer update`
```json
{
"require": {
"gazatem/dblogger": "dev-master"
}
}
```Don't forget to dump composer autoload
```php
composer dump-autoload
```Open your config/app.php add following line in the providers array
```php
Gazatem\DBLogger\DBLoggerServiceProvider::class
```Then in your bootstrap/app.php add / update your Monolog configiuration.
```php
$app->configureMonologUsing(function ($monolog) {
$monolog->pushHandler(new \Gazatem\DBLogger\DBLogger());
});
```Run following command to publish migration and configuration
```php
php artisan vendor:publish
``````php
php artisan migrate
```Open config/dblogger.php file and update the settings.
#USAGE
Do not fotget to include Log to your class
```php
use Log;
```And add log entry
```php
Log('user.register', ['id' => 23, 'name' => 'John Doe', 'email' => '[email protected]']);
```## Links
[gazatem.com](https://www.gazatem.com)