yet more logs

This commit is contained in:
Kyle Isom 2023-08-29 13:15:50 -07:00
parent dcbf937d38
commit 64190a500d
2 changed files with 10 additions and 1 deletions

View File

@ -121,6 +121,8 @@ func main() {
die.If(err) die.If(err)
} }
log.Infoln("nlink is starting")
log.Debugf("loading config file %s\n", configFile) log.Debugf("loading config file %s\n", configFile)
if err := config.LoadFile(configFile); err != nil { if err := config.LoadFile(configFile); err != nil {
log.Fatal(err) log.Fatal(err)

View File

@ -58,9 +58,14 @@ func restoreDatabase(path string) error {
defer dbFile.Close() defer dbFile.Close()
_, err = io.Copy(dbFile, obj) _, err = io.Copy(dbFile, obj)
if err != nil {
return err return err
} }
log.Debugln("database restored from minio")
return nil
}
func saveDatabase(path string) error { func saveDatabase(path string) error {
if minioClient == nil { if minioClient == nil {
if err := connectMinio(); err != nil { if err := connectMinio(); err != nil {
@ -91,5 +96,7 @@ func saveDatabase(path string) error {
if err != nil { if err != nil {
return err return err
} }
log.Debugln("database saved to minio")
return nil return nil
} }