From e43420ce71e795c8bebbb27e3a9e02509945c268 Mon Sep 17 00:00:00 2001 From: Travis Ralston <travpc@gmail.com> Date: Mon, 2 Sep 2019 16:16:58 -0600 Subject: [PATCH] Add some logging to startup functions --- cmd/media_repo/main.go | 1 + storage/storage.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/cmd/media_repo/main.go b/cmd/media_repo/main.go index 5790a58e..193a430a 100644 --- a/cmd/media_repo/main.go +++ b/cmd/media_repo/main.go @@ -46,6 +46,7 @@ func main() { } } + logrus.Info("Preparing database...") mediaStore := storage.GetDatabase().GetMediaStore(context.TODO(), &logrus.Entry{}) logrus.Info("Initializing datastores...") diff --git a/storage/storage.go b/storage/storage.go index 93add986..3cfd4625 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -63,15 +63,19 @@ func OpenDatabase(connectionString string, maxConns int, maxIdleConns int) error } // New the repo factories + logrus.Info("Setting up media DB store...") if d.repos.mediaStore, err = stores.InitMediaStore(d.db); err != nil { return err } + logrus.Info("Setting up thumbnails DB store...") if d.repos.thumbnailStore, err = stores.InitThumbnailStore(d.db); err != nil { return err } + logrus.Info("Setting up URL previews DB store...") if d.repos.urlStore, err = stores.InitUrlStore(d.db); err != nil { return err } + logrus.Info("Setting up metadata DB store...") if d.repos.metadataStore, err = stores.InitMetadataStore(d.db); err != nil { return err } -- GitLab