diff options
Diffstat (limited to 'internal/server/filemap.go')
-rw-r--r-- | internal/server/filemap.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/server/filemap.go b/internal/server/filemap.go index 466db49..6130e65 100644 --- a/internal/server/filemap.go +++ b/internal/server/filemap.go @@ -5,12 +5,12 @@ import ( "hash/fnv" "io" "io/fs" - "log" - "log/slog" "os" "path/filepath" "strings" + "website/internal/log" + "github.com/pkg/errors" ) @@ -36,7 +36,7 @@ func hashFile(filename string) (string, error) { func registerFile(urlpath string, filepath string) error { if files[urlpath] != (File{}) { - log.Printf("registerFile called with duplicate file, urlPath: %s", urlpath) + log.Info("registerFile called with duplicate file", "url_path", urlpath) return nil } hash, err := hashFile(filepath) @@ -61,7 +61,7 @@ func registerContentFiles(root string) error { } urlPath, _ := strings.CutSuffix(relPath, "index.html") if !f.IsDir() { - slog.Debug("registering file", "urlpath", "/"+urlPath) + log.Debug("registering file", "urlpath", "/"+urlPath) return registerFile("/"+urlPath, filePath) } return nil |