From d4321b50876a1cdb922552dab586d716dfb15a0a Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sat, 10 Feb 2018 15:16:30 -0800 Subject: [PATCH] Small bugfixes --- core/core.go | 2 ++ core/pages.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/core.go b/core/core.go index d8d78cb..5081fac 100644 --- a/core/core.go +++ b/core/core.go @@ -106,6 +106,8 @@ func (b *Blog) Configure() { markdown.Cache = cache } } + + b.registerErrors() } // SetupHTTP initializes the Negroni middleware engine and registers routes. diff --git a/core/pages.go b/core/pages.go index d39bce2..6b6a068 100644 --- a/core/pages.go +++ b/core/pages.go @@ -7,6 +7,7 @@ import ( "strings" "github.com/kirsle/blog/core/internal/controllers/posts" + "github.com/kirsle/blog/core/internal/log" "github.com/kirsle/blog/core/internal/markdown" "github.com/kirsle/blog/core/internal/render" "github.com/kirsle/blog/core/internal/responses" @@ -35,6 +36,7 @@ func (b *Blog) PageHandler(w http.ResponseWriter, r *http.Request) { // See if it resolves as a blog entry. err = postctl.ViewPost(w, r, strings.TrimLeft(path, "/")) if err != nil { + log.Error("Post by fragment %s not found: %s", path, err) responses.NotFound(w, r, "The page you were looking for was not found.") } return