diff --git a/distributor/main.go b/distributor/main.go index 0f61293..891e918 100644 --- a/distributor/main.go +++ b/distributor/main.go @@ -7,6 +7,7 @@ import ( "dev.sum7.eu/genofire/golang-lib/file" "github.com/bdlm/log" + "github.com/bdlm/std/logger" "unifiedpush.org/go/np2p_dbus/distributor" "unifiedpush.org/go/np2p_dbus/storage" ) @@ -37,9 +38,13 @@ func defaultPath(given, filename string) string { func main() { configPath := "" + loglevel := 40 flag.StringVar(&configPath, "c", configPath, "path to configuration file") + flag.IntVar(&loglevel, "l", loglevel, "loglevel") flag.Parse() + log.SetLevel(logger.Level(loglevel)) + config := &configData{} configPath = defaultPath(configPath, "config.toml") if err := file.ReadTOML(configPath, config); err != nil {