printing config key list
This commit is contained in:
parent
1ed2ddeca5
commit
225399690e
9
main.go
9
main.go
|
@ -2,7 +2,6 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -91,7 +90,7 @@ func main() {
|
||||||
|
|
||||||
flag.StringVar(&configFile, "f", defaultPath("nlink.conf"), "`path` to config file")
|
flag.StringVar(&configFile, "f", defaultPath("nlink.conf"), "`path` to config file")
|
||||||
flag.BoolVar(&initDB, "i", false, "initialize a new DB")
|
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.BoolVar(&markOnly, "m", false, "only mark posts as having been posted")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
@ -101,12 +100,16 @@ func main() {
|
||||||
Facility: "daemon",
|
Facility: "daemon",
|
||||||
WriteSyslog: false,
|
WriteSyslog: false,
|
||||||
}
|
}
|
||||||
fmt.Println(defaultPath("nlink.conf"))
|
|
||||||
|
|
||||||
if err := log.Setup(logOpts); err != nil {
|
if err := log.Setup(logOpts); err != nil {
|
||||||
die.If(err)
|
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"))
|
log.Infof("minio_bucket: %s", config.Get("minio_bucket"))
|
||||||
if err := restoreDatabase(config.Get("local_database")); err != nil {
|
if err := restoreDatabase(config.Get("local_database")); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Reference in New Issue