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_URL=http://localhost
|
||||||
APP_VERSION="4.0.0-rc.7"
|
APP_VERSION="4.0.0-rc.7"
|
||||||
|
|
||||||
|
###
|
||||||
|
# Logging
|
||||||
|
###
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
LOG_SLACK_WEBHOOK_URL=
|
||||||
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
###
|
###
|
||||||
# Database Caching (MongoDB)
|
# Database Caching (MongoDB)
|
||||||
###
|
###
|
||||||
|
@ -50,7 +50,7 @@ class Handler extends ExceptionHandler
|
|||||||
* @param \Throwable $e
|
* @param \Throwable $e
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function report(\Throwable $e)
|
public function report(\Throwable $e): void
|
||||||
{
|
{
|
||||||
parent::report($e);
|
parent::report($e);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ class QueryTopPeopleHandler implements RequestHandler
|
|||||||
* @param QueryTopPeopleCommand $request
|
* @param QueryTopPeopleCommand $request
|
||||||
* @returns PersonCollection
|
* @returns PersonCollection
|
||||||
*/
|
*/
|
||||||
public function handle($request)
|
public function handle($request): PersonCollection
|
||||||
{
|
{
|
||||||
$requestParams = collect($request->all());
|
$requestParams = collect($request->all());
|
||||||
$topItemsQuery = $this->repository->topPeople()->filter($requestParams);
|
$topItemsQuery = $this->repository->topPeople()->filter($requestParams);
|
||||||
|
@ -18,6 +18,23 @@ return [
|
|||||||
|
|
||||||
'default' => env('LOG_CHANNEL', 'stack'),
|
'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
|
| Log Channels
|
||||||
@ -43,14 +60,15 @@ return [
|
|||||||
'single' => [
|
'single' => [
|
||||||
'driver' => 'single',
|
'driver' => 'single',
|
||||||
'path' => storage_path('logs/lumen.log'),
|
'path' => storage_path('logs/lumen.log'),
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'daily' => [
|
'daily' => [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/daily/lumen.log'),
|
'path' => storage_path('logs/daily/lumen.log'),
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'days' => 14,
|
'days' => 14,
|
||||||
|
// 'replace_placeholders' => true, // enabled by default on 10.x - IDK what it does
|
||||||
],
|
],
|
||||||
|
|
||||||
'slack' => [
|
'slack' => [
|
||||||
@ -58,37 +76,43 @@ return [
|
|||||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
'username' => 'Laravel Log',
|
'username' => 'Laravel Log',
|
||||||
'emoji' => ':boom:',
|
'emoji' => ':boom:',
|
||||||
'level' => 'critical',
|
'level' => env('LOG_LEVEL', 'critical'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
'papertrail' => [
|
'papertrail' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'handler' => SyslogUdpHandler::class,
|
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||||
'handler_with' => [
|
'handler_with' => [
|
||||||
'host' => env('PAPERTRAIL_URL'),
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
'port' => env('PAPERTRAIL_PORT'),
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||||
],
|
],
|
||||||
],
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
|
|
||||||
'stderr' => [
|
|
||||||
'driver' => 'monolog',
|
|
||||||
'handler' => StreamHandler::class,
|
|
||||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
|
||||||
'with' => [
|
|
||||||
'stream' => 'php://stderr',
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'syslog' => [
|
'syslog' => [
|
||||||
'driver' => 'syslog',
|
'driver' => 'syslog',
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'facility' => LOG_USER,
|
||||||
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
'errorlog' => [
|
'errorlog' => [
|
||||||
'driver' => '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