diff --git a/waku.go b/waku.go index bf567a77..1d39b9b5 100644 --- a/waku.go +++ b/waku.go @@ -17,7 +17,7 @@ func main() { os.Exit(1) } - lvl, err := logging.LevelFromString("info") + lvl, err := logging.LevelFromString(options.LogLevel) if err != nil { os.Exit(1) } diff --git a/waku/options.go b/waku/options.go index 7072f195..67c4bef4 100644 --- a/waku/options.go +++ b/waku/options.go @@ -71,6 +71,7 @@ type Options struct { KeepAlive int `long:"keep-alive" default:"20" description:"Interval in seconds for pinging peers to keep the connection alive."` UseDB bool `long:"use-db" description:"Use SQLiteDB to persist information"` DBPath string `long:"dbpath" default:"./store.db" description:"Path to DB file"` + LogLevel string `short:"l" long:"log-level" description:"Define the logging level, supported strings are: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL, and their lower-case forms." default:"INFO"` Relay RelayOptions `group:"Relay Options"` Store StoreOptions `group:"Store Options"`