Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Supports environments that switched to docker runtime #42

Merged
merged 2 commits into from
Dec 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/Repositories/LogsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,18 @@ protected function logGroupName($group)
{
$vaporUi = config('vapor-ui');

$environment = $vaporUi['environment'];

$usingDockerRuntime = Str::endsWith(
$_ENV['AWS_LAMBDA_FUNCTION_NAME'] ?? '',
"$environment-d"
);

return sprintf(
'/aws/lambda/vapor-%s-%s%s',
'/aws/lambda/vapor-%s-%s%s%s',
$vaporUi['project'],
$vaporUi['environment'],
$environment,
$usingDockerRuntime ? '-d' : '',
in_array($group, ['cli', 'queue']) ? "-$group" : ''
);
}
Expand Down Expand Up @@ -179,6 +187,7 @@ protected function filterPattern($filters)
}

$query = $filters['query'] ?? '';

$exclude = $this->ignore
? '- "'.collect($this->ignore)->implode('" - "').'"'
: '';
Expand Down