mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
update logging config [adds .env values]
This commit is contained in:
parent
c3f1556d25
commit
88c3201874
@ -8,6 +8,13 @@ APP_TIMEZONE=UTC
|
||||
APP_URL=http://localhost
|
||||
APP_VERSION="4.0.0-rc.7"
|
||||
|
||||
###
|
||||
# Logging
|
||||
###
|
||||
LOG_CHANNEL=stack
|
||||
LOG_SLACK_WEBHOOK_URL=
|
||||
LOG_LEVEL=debug
|
||||
|
||||
###
|
||||
# Database Caching (MongoDB)
|
||||
###
|
||||
|
@ -50,7 +50,7 @@ class Handler extends ExceptionHandler
|
||||
* @param \Throwable $e
|
||||
* @throws Exception
|
||||
*/
|
||||
public function report(\Throwable $e)
|
||||
public function report(\Throwable $e): void
|
||||
{
|
||||
parent::report($e);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class QueryTopPeopleHandler implements RequestHandler
|
||||
* @param QueryTopPeopleCommand $request
|
||||
* @returns PersonCollection
|
||||
*/
|
||||
public function handle($request)
|
||||
public function handle($request): PersonCollection
|
||||
{
|
||||
$requestParams = collect($request->all());
|
||||
$topItemsQuery = $this->repository->topPeople()->filter($requestParams);
|
||||
|
@ -18,6 +18,23 @@ return [
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deprecations Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the log channel that should be used to log warnings
|
||||
| regarding deprecated PHP and library features. This allows you to get
|
||||
| your application ready for upcoming major versions of dependencies.
|
||||
|
|
||||
*/
|
||||
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => false,
|
||||
],
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
@ -43,14 +60,15 @@ return [
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/lumen.log'),
|
||||
'level' => 'debug',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/daily/lumen.log'),
|
||||
'level' => 'debug',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => 14,
|
||||
// 'replace_placeholders' => true, // enabled by default on 10.x - IDK what it does
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
@ -58,37 +76,43 @@ return [
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => 'critical',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => 'debug',
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => 'debug',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'facility' => LOG_USER,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => 'debug',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => \Monolog\Handler\NullHandler::class,
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/emergency_laravel.log'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user