From 0e995406558f718b51f7b27d0b7991f262b6a2e3 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Sun, 24 Jun 2018 07:32:32 -0700 Subject: [PATCH] move debug up --- connect.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/connect.go b/connect.go index 3545a44..96ce75c 100644 --- a/connect.go +++ b/connect.go @@ -79,7 +79,11 @@ func NewConnection(config *AppConfig) (*Connection, error) { c.Local = config.Local c.keypair, _ = keypair.New() fmt.Fprintf(os.Stderr, "Your public key: %s\n", c.keypair.Public) - + if c.Debug { + SetLogLevel("debug") + } else { + SetLogLevel("error") + } if c.Local { c.Yes = true c.DontEncrypt = true @@ -143,12 +147,6 @@ func NewConnection(config *AppConfig) (*Connection, error) { c.File.IsEncrypted = false } - if c.Debug { - SetLogLevel("debug") - } else { - SetLogLevel("error") - } - return c, nil }