Looking to hire Laravel developers? Try LaraJobs

laravel-monolog-ext maintained by omatech

Description
Extension Monolog Logging
Last update
2019/11/25 13:46 (dev-master)
License
Downloads
620

Comments
comments powered by Disqus

Laravel Monolog Extension

Latest Version on Packagist Total Downloads

This package is to send logs of Laravel framework, to different services, now only you can send to CloudWatch.

Installation

You can install the package via composer:

composer require omatech/laravel-monolog-ext

Usage

CloudWatch:

First you need to configurate credentials and region settings AWS ( see: aws/aws-sdk-php-laravel ).

In bootstrap\app.php, you need to add this:

$app->configureMonologUsing(function ($monolog) {
    $logger = App::make(MonologLogging::class);
    $logger->pushHandler($monolog);
});

If you want to add another service, you need to publish the config file.

php artisan vendor:publish  --provider="Omatech\LaravelMonologExt\LaravelMonologExtServiceProvider"

The settings can be found in the generated config/laravel-monolog-ext.php configuration file.. Now you have two options:

  • APP_LOG_DRIVER_AWS
  • APP_LOG_DRIVER_FILE

You need to put true this enviroments if you want to use.

###CloudWatch

  • APP_LOG_DRIVER_AWS: true / false
  • APP_LOG_DRIVER_AWS_GROUP: string
  • APP_LOG_LEVEL: same options of log level monologging. default: debug
  • APP_LOG_RETENTION: days. default: 140

###File

  • APP_LOG_LEVEL: same options of log level monologging. default: debug

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email apons@omatech.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.