diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-25 21:24:34 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-25 21:24:34 +0200 |
commit | 92b3181672b62052d4193749cd02f4be7d91e2ee (patch) | |
tree | a7061ae56b986ca6d513439b0a54337e1bda9ca6 /main.go | |
parent | e7acda5f2494d78f7bd41c4b7eff982f007a1b36 (diff) | |
download | feed2imap-go-92b3181672b62052d4193749cd02f4be7d91e2ee.tar.gz feed2imap-go-92b3181672b62052d4193749cd02f4be7d91e2ee.tar.bz2 feed2imap-go-92b3181672b62052d4193749cd02f4be7d91e2ee.zip |
Add debug output
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -16,6 +16,7 @@ import ( var cfgFile = flag.String("f", "config.yml", "configuration file") var cacheFile = flag.String("c", "feed.cache", "cache file") var verbose = flag.Bool("v", false, "enable verbose output") +var debug = flag.Bool("d", false, "enable debug output") func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *sync.WaitGroup) { defer wg.Done() @@ -46,7 +47,11 @@ func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *s func run() error { flag.Parse() - log.SetDebug(*verbose) + if *debug { + log.SetDebug() + } else if *verbose { + log.SetVerbose() + } log.Print("Starting up...") |