peroxide: Add flag to set the log level

Issue #6
create-reload-action
Lukasz Janyst 4 years ago
parent a740b7b410
commit 69befee6d3
No known key found for this signature in database
GPG Key ID: 32DE641041F17A9A
  1. 4
      cmd/peroxide/main.go

@ -22,14 +22,18 @@ import (
"github.com/ljanyst/peroxide/pkg/bridge"
"github.com/ljanyst/peroxide/pkg/files"
"github.com/ljanyst/peroxide/pkg/logging"
"github.com/sirupsen/logrus"
)
var config = flag.String("config", files.ExpandTilde("~/.config/protonmail/bridge/prefs.json"), "configuration file")
var logLevel = flag.String("log-level", "Warning", "account name")
func main() {
flag.Parse()
logging.SetLevel(*logLevel)
b := &bridge.Bridge{}
err := b.Configure(*config)

Loading…
Cancel
Save