diff --git a/.env.example b/.env.example index 58881a9..e07d99a 100644 --- a/.env.example +++ b/.env.example @@ -15,6 +15,7 @@ BROADCAST_DRIVER=log CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync +LOG_CHANNEL=stack REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null diff --git a/composer.json b/composer.json index cfd081d..edff832 100644 --- a/composer.json +++ b/composer.json @@ -7,15 +7,15 @@ "require": { "php": ">=7.1.3", "laravel/framework": "5.7.*", - "anhskohbo/no-captcha": "^2.*", + "anhskohbo/no-captcha": "3.*", "soundasleep/html2text": "~0.3" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~6.0", - "symfony/css-selector": "^4.0.*", - "symfony/dom-crawler": "^4.0.*", + "symfony/css-selector": "4.0.*", + "symfony/dom-crawler": "4.0.*", "filp/whoops": "~2.0" }, "autoload": { diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 0000000..c92561a --- /dev/null +++ b/config/logging.php @@ -0,0 +1,92 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ + + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + 'days' => 7, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => 'critical', + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => 'debug', + 'handler' => SyslogUdpHandler::class, + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + ], + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'handler' => StreamHandler::class, + 'with' => [ + 'stream' => 'php://stderr', + ], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => 'debug', + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => 'debug', + ], + ], + +];