all repos — searchix @ 439f863b71a698053ee0cd3c7a9865c286be3ec7

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: log index loading progress at startup
Alan Pearce alan@alanpearce.eu
Wed, 08 May 2024 13:36:11 +0200
commit

439f863b71a698053ee0cd3c7a9865c286be3ec7

parent

24b81a63620667cd9c9f50952bbe881c08f16048

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M internal/server/server.gointernal/server/server.go
@@ -87,8 +87,9 @@ } 
 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)
 	}