about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
authorAlan Pearce2024-05-08 13:36:11 +0200
committerAlan Pearce2024-05-08 13:36:11 +0200
commit439f863b71a698053ee0cd3c7a9865c286be3ec7 (patch)
treeef311634f04aeb67eaf0ba54b8e01b6740fee039 /internal
parent24b81a63620667cd9c9f50952bbe881c08f16048 (diff)
downloadsearchix-439f863b71a698053ee0cd3c7a9865c286be3ec7.tar.lz
searchix-439f863b71a698053ee0cd3c7a9865c286be3ec7.tar.zst
searchix-439f863b71a698053ee0cd3c7a9865c286be3ec7.zip
refactor: log index loading progress at startup
Diffstat (limited to 'internal')
-rw-r--r--internal/server/server.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index db40e6f..b794f05 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -87,8 +87,9 @@ var sourceFileName = map[string]string{
 
 func makeIndex(source string, filename string) {
 	var err error
-	log.Printf("loading %s index", source)
+	slog.Info("loading index", "index", source)
 	index[source], err = search.New(filename)
+	slog.Info("loaded index", "index", source)
 	if err != nil {
 		log.Fatalf("could not build search index, error: %#v", err)
 	}