environmentRepository->find($id) : null; if (null === $environment) { throw new NotFoundHttpException(sprintf('Environment "%s" not found.', $id)); } $request = $this->requestStack->getCurrentRequest(); $lines = (int) ($request?->query->get('lines', '100') ?? 100); $since = $request?->query->get('since'); $content = $this->logService->getDockerLogs( $environment->getContainerName(), $lines, $since, ); $dto = new LogOutput(); $dto->content = $content; $dto->lines = $lines; $dto->source = sprintf('docker:%s', $environment->getContainerName()); return $dto; } }