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 (
|
||||
"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)
|
||||
|
|
Loading…
Reference in New Issue