Skip to content

Commit

Permalink
minor logging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Feb 12, 2019
1 parent 4f9185b commit fe5a472
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backends/lnd.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (lnd *LND) Connect() error {
macaroon, err := getMacaroon(lnd.MacaroonFile)

if macaroon == nil && err != nil {
log.Error("Failed to read macaroon file of LND: ", err)
log.Error("Failed to read macaroon file of LND: ", err.Error())

} else {
lnd.ctx = metadata.NewOutgoingContext(lnd.ctx, macaroon)
Expand Down
5 changes: 2 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"runtime"
"strings"

"github.com/jessevdk/go-flags"
flags "github.com/jessevdk/go-flags"
"github.com/michael1011/lightningtip/backends"
"github.com/michael1011/lightningtip/database"
"github.com/michael1011/lightningtip/notifications"
"github.com/michael1011/lightningtip/version"
"github.com/op/go-logging"
logging "github.com/op/go-logging"
)

const (
Expand Down Expand Up @@ -244,7 +244,6 @@ func getDefaultMacaroon() string {
}
}

log.Warning("Could not find macaroon file")
return ""
}

Expand Down
7 changes: 6 additions & 1 deletion frontend/lightningTip.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Don't forget the "/" at the end!
var requestUrl = window.location.protocol + "//" + window.location.hostname + ":8081/";

// Used for development
if (window.location.protocol === "file:") {
requestUrl = "http://localhost:8081/"
}

// To prohibit multiple requests at the same time
var requestPending = false;

Expand Down Expand Up @@ -320,4 +325,4 @@ function divRestorePlaceholder(element) {
if (element.innerHTML === "<br>" || element.innerHTML === "<div><br></div>") {
element.innerHTML = "";
}
}
}

0 comments on commit fe5a472

Please sign in to comment.