diff --git a/.gitignore b/.gitignore index 59e31491c..bacb55934 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ scaladex.log .metals/ **/project/metals.sbt .bsp/ -.vscode +.vscode/ diff --git a/modules/server/src/main/scala/scaladex/server/route/ProjectPages.scala b/modules/server/src/main/scala/scaladex/server/route/ProjectPages.scala index 7861b2afc..5fb8c31cf 100644 --- a/modules/server/src/main/scala/scaladex/server/route/ProjectPages.scala +++ b/modules/server/src/main/scala/scaladex/server/route/ProjectPages.scala @@ -199,7 +199,10 @@ class ProjectPages(env: Env, database: WebDatabase, searchEngine: SearchEngine)( ) Future.successful(redirect(redirectUri, StatusCodes.MovedPermanently)) case Some(project) => f(project) - case None => Future.successful(complete(StatusCodes.NotFound, notfound(env, user))) + case None => { + logger.warn(s"Project $ref not found") + Future.successful(complete(StatusCodes.NotFound, notfound(env, user))) + } } onSuccess(future)(identity) } @@ -248,6 +251,7 @@ class ProjectPages(env: Env, database: WebDatabase, searchEngine: SearchEngine)( private def getProjectPage(ref: Project.Reference, user: Option[UserState]): Route = getProjectOrRedirect(ref, user) { project => + logger.info(s"Accessing project page for: $ref") for { header <- getProjectHeader(project) directDependencies <- @@ -256,6 +260,7 @@ class ProjectPages(env: Env, database: WebDatabase, searchEngine: SearchEngine)( .getOrElse(Future.successful(Seq.empty)) reverseDependencies <- database.getProjectDependents(ref) } yield { + logger.info(s"Successfully retrieved project data for: $ref") val groupedDirectDependencies = directDependencies .groupBy(_.target) .view