additional logging

This commit is contained in:
Kyle Isom 2023-08-29 13:00:05 -07:00
parent d0929f5b01
commit 08c92ca74d
1 changed files with 8 additions and 7 deletions

15
main.go
View File

@ -121,16 +121,16 @@ func main() {
die.If(err)
}
log.Debugln("config keys")
for _, k := range config.ListKeys() {
log.Debugf("key: %s", k)
}
log.Debugf("loading config file %s\n", configFile)
if err := config.LoadFile(configFile); err != nil {
log.Fatal(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)
@ -166,10 +166,11 @@ func main() {
log.Debugf("will look for new items every %s\n", interval)
for {
log.Infoln("running fetch loop")
for _, feed := range feeds {
log.Infoln("fetching items")
log.Infof("fetching items for feed %s", feed)
if err := fetchItems(db, feed, markOnly); err != nil {
log.Info(err)
log.Errln(err)
}
}
time.Sleep(interval)