printing config key list

This commit is contained in:
Kyle Isom 2023-05-06 01:27:50 -07:00
parent 1ed2ddeca5
commit 225399690e
1 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,6 @@ package main
import (
"flag"
"fmt"
"path/filepath"
"time"
@ -91,7 +90,7 @@ func main() {
flag.StringVar(&configFile, "f", defaultPath("nlink.conf"), "`path` to config file")
flag.BoolVar(&initDB, "i", false, "initialize a new DB")
flag.StringVar(&level, "l", "INFO", "log level")
flag.StringVar(&level, "l", "DEBUG", "log level")
flag.BoolVar(&markOnly, "m", false, "only mark posts as having been posted")
flag.Parse()
@ -101,12 +100,16 @@ func main() {
Facility: "daemon",
WriteSyslog: false,
}
fmt.Println(defaultPath("nlink.conf"))
if err := log.Setup(logOpts); err != nil {
die.If(err)
}
log.Debugln("config keys")
for _, k := range config.ListKeys() {
log.Debugf("key: %s", k)
}
log.Infof("minio_bucket: %s", config.Get("minio_bucket"))
if err := restoreDatabase(config.Get("local_database")); err != nil {
log.Fatal(err)