mirror of https://github.com/schollz/croc.git
move debug up
This commit is contained in:
parent
9746014f0b
commit
0e99540655
12
connect.go
12
connect.go
|
@ -79,7 +79,11 @@ func NewConnection(config *AppConfig) (*Connection, error) {
|
||||||
c.Local = config.Local
|
c.Local = config.Local
|
||||||
c.keypair, _ = keypair.New()
|
c.keypair, _ = keypair.New()
|
||||||
fmt.Fprintf(os.Stderr, "Your public key: %s\n", c.keypair.Public)
|
fmt.Fprintf(os.Stderr, "Your public key: %s\n", c.keypair.Public)
|
||||||
|
if c.Debug {
|
||||||
|
SetLogLevel("debug")
|
||||||
|
} else {
|
||||||
|
SetLogLevel("error")
|
||||||
|
}
|
||||||
if c.Local {
|
if c.Local {
|
||||||
c.Yes = true
|
c.Yes = true
|
||||||
c.DontEncrypt = true
|
c.DontEncrypt = true
|
||||||
|
@ -143,12 +147,6 @@ func NewConnection(config *AppConfig) (*Connection, error) {
|
||||||
c.File.IsEncrypted = false
|
c.File.IsEncrypted = false
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.Debug {
|
|
||||||
SetLogLevel("debug")
|
|
||||||
} else {
|
|
||||||
SetLogLevel("error")
|
|
||||||
}
|
|
||||||
|
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue