0
0
forked from toolshed/abra

feat: debug logging

Closes coop-cloud/organising#164.
This commit is contained in:
2021-09-11 00:54:02 +02:00
parent 27d665c3be
commit 9fcdc45851
38 changed files with 305 additions and 95 deletions

View File

@ -62,10 +62,12 @@ All communication between Abra and the server will use this SSH connection.
for _, context := range contexts {
if context.Name == domainName {
logrus.Fatalf("Server at '%s' already exists?", domainName)
logrus.Fatalf("server at '%s' already exists?", domainName)
}
}
logrus.Debugf("creating context with domain '%s', username '%s' and port '%s'", domainName, username, port)
if err := client.CreateContext(domainName, username, port); err != nil {
logrus.Fatal(err)
}
@ -77,11 +79,12 @@ All communication between Abra and the server will use this SSH connection.
}
if _, err := cl.Info(ctx); err != nil {
logrus.Fatalf("Unable to make a connection to '%s'?", domainName)
logrus.Fatalf("unable to make a connection to '%s'?", domainName)
logrus.Debug(err)
}
logrus.Infof("Server at '%s' has been added", domainName)
logrus.Debugf("remote connection to '%s' is definitely up", domainName)
logrus.Infof("server at '%s' has been added", domainName)
return nil
},