PHP code example of golin / monologgly

1. Go to this page and download the library: Download golin/monologgly 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/ */

    

golin / monologgly example snippets


$logger->debug('Oh No!', ['exception' => $e]);

    'loggly-token' => env('LOGGLY_TOKEN'),



namespace App\Providers;

use Golin\MonoLoggly\LogglyServiceProvider as BaseProvider;
use Monolog\Monolog;

class LogglyServiceProvider extends BaseProvider {

    /**
     * The log name. This should uniquely identify the log.
     *
     * @var string
     */
    protected $name;

    /**
     * The minimum log level.
     *
     * @var int
     */
    protected $level = Monolog::DEBUG;

    /**
     * A place to construct any other processors that will be added to 
     * the loggly handler.
     *
     * @return array   An array of callables objects
     */
    protected function processors()
    {
        return [];
    }

}