peipei / beanstalk-logger-channel
Send log message as a job to beanstalk
v1.0.4
2024-08-14 01:42 UTC
Requires
- php: ^7.1.3|^8.0
- illuminate/support: ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0|^10.0|^11.0
- monolog/monolog: ^1.23|^2.0|^3.2
- pda/pheanstalk: ^5.0 | ^4.0
README
Send log message as a job to beanstalk
Install
composer require peipei/beanstalk-logger-channel
Add to .env
BEANSTALKD_HOST=127.0.0.1
BEANSTALKD_JOB_TUBE=laravel-log
Add to config/logging.php file new channel:
'beanstalk' => [ 'driver' => 'custom', 'via' => Logger\BeanstalkJobLogger::class, 'level' => 'debug', ]
Add to config/beanstalk-logger.php
<?php return [ // Beanstalk host 'host' => env('BEANSTALKD_HOST', '127.0.0.1'), // Beanstalk tube 'tube' => env('BEANSTALKD_JOB_TUBE', 'laravel-log'), ];
If your default log channel is a stack, you can add it to the stack channel like this
'stack' => [ 'driver' => 'stack', 'channels' => ['single', 'beanstalk'], ]