litermi/logs

package to log routines and sql query

Maintainers

Details

github.com/litermi/log

Source

1.0.28 2023-04-10 17:21 UTC

README

Software License

About

The logs package to send logs to console with extra info and catch query sql .

Tutorial how create composer package

Installation

Require the litermi/logs package in your composer.json and update your dependencies:

composer require litermi/logs

Configuration

set provider

'providers' => [
    // ...
    Litermi\Logs\Providers\ServiceProvider::class,
],

The defaults are set in config/logs.php. Publish the config to copy the file to your own config:

php artisan vendor:publish --provider="Litermi\Logs\Providers\ServiceProvider"

Note: this is necessary to you can change default config

Usage

add provider in config/app.php

    'providers' => [
        Litermi\Logs\Providers\QueryLogProvider::class,
   ]
$extraValues['test'] = 1;
LogConsoleFacade::full()->tracker()->log('your message', $extraValues);

License

Released under the MIT License, see LICENSE.