@page @model repomgr.Pages.Log @{ Layout = null; Response.Headers["Content-Type"] = "text/plain"; if (Program.Repo._repo.Packages.Any(p => p.Name.Equals(Request.Query["package"]))) { var logfile = System.IO.Path.Combine(Program.Repo._logpath, $"{Request.Query["package"]}.log"); if (System.IO.File.Exists(logfile)) { @Html.Raw(System.IO.File.ReadAllText(logfile)) } else { @Html.Raw("Package exists but no logfile found") } } else { @Html.Raw("Package not found") } }