2017 © Pedro Peláez
 

library laralog

Setup your log handlers per environment in your Laravel application.

image

laralog/laralog

Setup your log handlers per environment in your Laravel application.

  • Wednesday, May 4, 2016
  • by foxted
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laralog

Packagist Packagist Packagist Travis, (*1)

Description

Setup your log handlers per environment in your Laravel application., (*2)

CURRENTLY UNDER DEVELOPMENT, (*3)

Installation

PHP 7.0+ required., (*4)

To get the latest version of Laralog, simply require the project using Composer:, (*5)

$ composer require laralog/laralog

Instead, you may of course manually update your require block and run composer update if you so choose:, (*6)

{
    "require": {
        "laralog/laralog": "dev-master"
    }
}

Laravel 5.4+

Package will be automatically discovered when running composer update or php artisan package:discover., (*7)

Laravel <= 5.4

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

<?php 

'providers' => [
    ...
    Laralog\LaralogServiceProvider::class,
],

Configuration

Laralog requires configuration., (*9)

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

$ php artisan vendor:publish

This will create a config/laralog.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)

Environments

To add an environment configuration, add a key to the environment array, with the name of your environment and containing an array with the handlers you want to use, for example:, (*12)

    'environments' => [
        'local' => ['slack']
    ]

Handlers

To add a handler configuration, add a key to the handlers array, with the name of your handler and the required information for it., (*13)

Slack

    'handlers' => [
        'slack' => [
            'api_key' => 'YOUR_SLACK_API_KEY',
            'channel' => '#general'
        ]
    ]

Usage

Use the logging methods from Laravel as usual ;), (*14)

https://laravel.com/docs/5.2/errors#logging, (*15)

Currently Supported Handlers

Future Support

  • [ ] NativeMailerHandler
  • [ ] SwiftMailerHandler
  • [ ] HipChatHandler
  • [ ] NewRelicHandler
  • [ ] LogglyHandler
  • [ ] RollbarHandler
  • [ ] PushoverHandler
  • [ ] ChromePHPHandler
  • [ ] PHPConsoleHandler
  • [ ] BugsnagHandler

The Versions

04/05 2016

dev-master

9999999-dev

Setup your log handlers per environment in your Laravel application.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging monolog

04/05 2016

0.0.1

0.0.1.0

Setup your log handlers per environment in your Laravel application.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging monolog

04/05 2016

dev-develop

dev-develop

Setup your log handlers per environment in your Laravel application.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging monolog