about summary refs log tree commit diff stats
path: root/internal/builder/posts.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-19 15:42:36 +0200
committerAlan Pearce2024-05-19 15:53:32 +0200
commit09ee2de72936ea0b0edc5d3360ce1c72803a817b (patch)
tree427a590fba06e58554586aad8995fcb6e7a559f3 /internal/builder/posts.go
parent4064f933a965f2fb2ce43d3c2d5bd54ccd33978c (diff)
downloadwebsite-09ee2de72936ea0b0edc5d3360ce1c72803a817b.tar.lz
website-09ee2de72936ea0b0edc5d3360ce1c72803a817b.tar.zst
website-09ee2de72936ea0b0edc5d3360ce1c72803a817b.zip
log in logfmt via zap, with nicer console output in dev
Diffstat (limited to 'internal/builder/posts.go')
-rw-r--r--internal/builder/posts.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/builder/posts.go b/internal/builder/posts.go
index a4526e4..954e259 100644
--- a/internal/builder/posts.go
+++ b/internal/builder/posts.go
@@ -2,13 +2,13 @@ package builder
 
 import (
 	"bytes"
-	"log/slog"
 	"os"
 	"path"
 	"path/filepath"
 	"slices"
 	"strings"
 	"time"
+	"website/internal/log"
 
 	"github.com/adrg/frontmatter"
 	mapset "github.com/deckarep/golang-set/v2"
@@ -91,7 +91,7 @@ func readPosts(root string, inputDir string, outputDir string) ([]Post, Tags, er
 		if !f.IsDir() && path.Ext(pathFromRoot) == ".md" {
 			output := outputReplacer.Replace(pathFromRoot)
 			url := urlReplacer.Replace(pathFromRoot)
-			slog.Debug("reading post", "post", pathFromRoot)
+			log.Debug("reading post", "post", pathFromRoot)
 			matter, content, err := getPost(pathFromRoot)
 			if err != nil {
 				return nil, nil, err
@@ -101,7 +101,7 @@ func readPosts(root string, inputDir string, outputDir string) ([]Post, Tags, er
 				tags.Add(strings.ToLower(tag))
 			}
 
-			slog.Debug("rendering markdown in post", "post", pathFromRoot)
+			log.Debug("rendering markdown in post", "post", pathFromRoot)
 			html, err := renderMarkdown(content)
 			if err != nil {
 				return nil, nil, err