PHP code example of maplesnow / laravel-monolog-config

1. Go to this page and download the library: Download maplesnow/laravel-monolog-config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maplesnow / laravel-monolog-config example snippets


    MapleSnow\MonologConfig\MonologConfigServiceProvider::class
    

    /*
    |--------------------------------------------------------------------------
    | Configure Monolog
    |--------------------------------------------------------------------------
    */
    $app->configureMonologUsing(function (\Monolog\Logger $monolog) {
        (new MapleSnow\MonologConfig\MonologConfigurator($monolog))->run();
    });

    

Log::emergency($message);
Log::alert($message);
Log::critical($message);
Log::error($message);
Log::warning($message);
Log::notice($message);
Log::info($message);
Log::debug($message);

Log::debug($message,['extra' => "extra message"]);

    php artisan vendor:publish --provider="MapleSnow\MonologConfig\MonologConfigServiceProvider"