2017 © Pedro Peláez
 

library laravel-easy-log

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

image

cafe-serendipity/laravel-easy-log

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  • Friday, December 8, 2017
  • by cafe-serendipity
  • Repository
  • 1 Watchers
  • 0 Stars
  • 188 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

laravel-easy-log

Laravel-Easy-Log helps you to log into differnet files per level or into a MySQL-datatbase, for which you also get a Log-view., (*1)

Installation

composer require cafe-serendipity/laravel-easy-log

AddProvider

  • add the provider to config/app.php
Piccard\LEL\LELServiceProvider::class

Publish files

  • having the configuration-file, views & controller available in your application, you have to publish them
php artisan vendor:publish --tag=lel --force

Decide how to log

Application-Level

  • if you wanna log on application-level, means also Laravel is logging through Laravel-Easy-Log, add the following to bootstrap/app.php just before return $app;. Because Laravel-Easy-Log is logging ow for you, you have to switch on at least file or db in config/laravel-easy-log.php
$app->configureMonologUsing(function ($logger) {
  \Piccard\LEL\LEL::configureMonolog($logger);
});
  • now use it as usual:
use Illuminate\Support\Facades\Log;

...

Log::debug("CONTEXT log in DEBUG", array('col1' => 'Hi, I am a context log.'));    
Log::info("CONTEXT log in INFO", array(
        'col1' => 'Hi, I am a context log.',
        'col2' => 'Hi, I am a context log.'
    ));

Custom-Level

  • if you don't wanna have Laravel logging through Laravel-Easy-Log, but you wanna do it on your own, you have to create an instance of Laravel-Easy-Log:
$logger = \Piccard\LEL\LEL::configureMonolog("channel-name"); 
$logger->info("Whatever you want to log");
  • now use the instance:
$logger->debug("CONTEXT log in DEBUG", array('col1' => 'Hi, I am a context log.'));    
$logger->info("CONTEXT log in INFO", array(
        'col1' => 'Hi, I am a context log.',
        'col2' => 'Hi, I am a context log.'
    ));

Configure Laravel-Easy-Log

Open up config/laravel-easy-log and enable the handlers you want to use. Basically you can use the same options like in Monolog., (*2)

DB

  • use_default_connection You can use your default DB-connection or define a custom one.
  • app is just another column, if you use different Laravel-applications and the same logging-server, so you can filter them better out.
  • table the table which will be created for logging
  • columns define here some extra columns, which you can use when you log, which is similar to Monolog's context logging
Log::info("CONTEXT log in DEBUG", array('col1' => 'Hi, I am a context log.'));
Log-View

To get to the view of your DB-Logs goto the route /lel, (*3)

Files

  • log_levels define here which files you want foreach log-level

License

laravel-easy-log is licensed under the MIT License - see the LICENSE file for details., (*4)

Author

Andreas Stephan, (*5)

The Versions

08/12 2017

dev-master

9999999-dev

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

08/12 2017

0.1.10

0.1.10.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

08/12 2017

dev-develop

dev-develop

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

17/11 2017

0.1.9

0.1.9.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

20/10 2017

0.1.8

0.1.8.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

20/10 2017

0.1.6

0.1.6.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

20/10 2017

0.1.7

0.1.7.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

04/09 2017

0.1.5

0.1.5.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

23/08 2017

0.1.4

0.1.4.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

23/08 2017

0.1.3

0.1.3.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

23/08 2017

0.1.2

0.1.2.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

15/08 2017

0.1.1

0.1.1.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, stdOut- & stdError- and also mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel log mail file logging mysql stdout stderr

13/08 2017

v0.1

0.1.0.0

Makes logging easy inside your Laravel-project. Includes handlers for file-, MySql-, StdOut- & StdError- and also Mail-logging.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Stephan

database laravel mail file logging mysql stdout stderr