Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.

This package provides a simple way to configure monolog in laravel.

License

Notifications You must be signed in to change notification settings

Astrotomic/laravel-monolog-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Monolog Configurator - Laravel 5

GitHub Author GitHub release GitHub license GitHub issues

StyleCI Code Climate Code Climate

This package provides a simple way to configure monolog in Laravel/Lumen.


Installation

Step 1

Add it on your composer.json

"astrotomic/laravel-monolog-config": "^1.0"

and run

composer update

or run

composer require astrotomic/laravel-monolog-config

Step 2

Add the following string to config/app.php

Providers array:

\Astrotomic\MonologConfig\MonologConfigServiceProvider::class,

Step 3

Publish the configuration for monolog with the following command:

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

And adjust all the configurations to your needs.

Step 4

Use it as your monolog configuration tool. Add this to your bootstrap/app.php after the Interface bindings and before the return:

/*
|--------------------------------------------------------------------------
| Configure Monolog
|--------------------------------------------------------------------------
*/

$app->configureMonologUsing(function (Monolog\Logger $monolog) {
    $configurator = new \Astrotomic\MonologConfig\MonologConfigurator($monolog);
    $configurator->run();
});

You can configure monolog after this your own in this method the normal Laravel way.

Handlers

At the moment this class supports the following handlers, if you need any other one just create a PR or write an issue.

v1.0.0

  • \Monolog\Handler\ErrorLogHandler
  • \Monolog\Handler\GelfHandler
  • \Monolog\Handler\LogglyHandler
  • \Monolog\Handler\MandrillHandler
  • \Monolog\Handler\MongoDBHandler
  • \Monolog\Handler\NativeMailerHandler
  • \Monolog\Handler\RotatingFileHandler
  • \Monolog\Handler\StreamHandler
  • \Monolog\Handler\SyslogHandler

v1.1.0

  • \Monolog\Handler\HipChatHandler
  • \Monolog\Handler\IFTTTHandler
  • \Monolog\Handler\LogEntriesHandler
  • \Monolog\Handler\NullHandler
  • \Monolog\Handler\RedisHandler
  • \Monolog\Handler\ZendMonitorHandler

v1.3.0

  • \Monolog\Handler\SlackHandler
  • \Monolog\Handler\SlackWebhookHandler
  • \Monolog\Handler\SlackbotHandler

About

This package provides a simple way to configure monolog in laravel.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Contributors 2

  •  
  •  

Languages