2017 © Pedro Peláez
 

library logger

Provides Multiple Loggers At Once

image

graham-campbell/logger

Provides Multiple Loggers At Once

  • Friday, June 26, 2015
  • by graham-campbell
  • Repository
  • 2 Watchers
  • 7 Stars
  • 430 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laravel Logger

Laravel Logger was created by, and is maintained by Graham Campbell, and provides multiple loggers at once for Laravel 5. Feel free to check out the change log, releases, license, and contribution guidelines., (*1)

WARNING

This package is no longer maintained.

Laravel Logger, (*2)

Build Status Coverage Status Quality Score Software License Latest Version , (*3)

Installation

PHP 5.5+ or HHVM 3.6+, and Composer are required., (*4)

To get the latest version of Laravel Logger, simply add the following line to the require block of your composer.json file:, (*5)

"graham-campbell/logger": "~1.1"

You'll then need to run composer install or composer update to download it and have the autoloader updated., (*6)

Once Laravel Logger is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key., (*7)

  • 'GrahamCampbell\Logger\LoggerServiceProvider'

You can register the Logger facade in the aliases key of your config/app.php file if you like., (*8)

  • 'Logger' => 'GrahamCampbell\Logger\Facades\Logger'

Configuration

Laravel Logger supports optional configuration., (*9)

To get started, you'll need to publish all vendor assets:, (*10)

$ php artisan vendor:publish

This will create a config/logger.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases., (*11)

There is one config option:, (*12)

Loggers

This option ('loggers') defines each of the loggers to call under the hood while logging., (*13)

Usage

Laravel logger provides a clean way to log to multiple destinations at once. Simply fill out the config with the psr loggers you want to use, and we'll do the rest. We even allow you to configure which level of messages to send to each logger., (*14)

Due to limitations with the way Laravel's setup, we cannot override the log instance that's bound to the ioc, so you'll find that still gives you an instance of Laravel's bog standard logger, and Laravel's Log facade will be using that instance too, however we do provide our own facade to use if you'd like., (*15)

The main advantage to this package is that we are still able to override the ioc bindings to the psr logger interface and to Laravel's logger contract, so if you're dependency injecting those, you'll get our fancy logger to work with. Brilliant!, (*16)

An example of where this package can really help you out is in the exception handler. Without you having to make any changes there, you immediately have the ability to log to multiple places as Laravel's injecting our logger into your exception handler because of the binding we have to the psr logger interface., (*17)

License

Laravel Logger is licensed under The MIT License (MIT)., (*18)

The Versions

26/06 2015

dev-master

9999999-dev

Provides Multiple Loggers At Once

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel logger log framework logging graham campbell grahamcampbell multiple logs laravel logger laravel-logger

26/06 2015

v1.1.0

1.1.0.0

Provides Multiple Loggers At Once

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel logger log framework logging graham campbell grahamcampbell multiple logs laravel logger laravel-logger

30/05 2015

v1.0.0

1.0.0.0

Provides Multiple Loggers At Once

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel logger log framework logging graham campbell grahamcampbell multiple logs laravel logger laravel-logger