Skip to content

Commit fe5a472

Browse files
committed
minor logging improvements
1 parent 4f9185b commit fe5a472

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

backends/lnd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (lnd *LND) Connect() error {
4848
macaroon, err := getMacaroon(lnd.MacaroonFile)
4949

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

5353
} else {
5454
lnd.ctx = metadata.NewOutgoingContext(lnd.ctx, macaroon)

config.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import (
1010
"runtime"
1111
"strings"
1212

13-
"github.com/jessevdk/go-flags"
13+
flags "github.com/jessevdk/go-flags"
1414
"github.com/michael1011/lightningtip/backends"
1515
"github.com/michael1011/lightningtip/database"
1616
"github.com/michael1011/lightningtip/notifications"
1717
"github.com/michael1011/lightningtip/version"
18-
"github.com/op/go-logging"
18+
logging "github.com/op/go-logging"
1919
)
2020

2121
const (
@@ -244,7 +244,6 @@ func getDefaultMacaroon() string {
244244
}
245245
}
246246

247-
log.Warning("Could not find macaroon file")
248247
return ""
249248
}
250249

frontend/lightningTip.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// Don't forget the "/" at the end!
33
var requestUrl = window.location.protocol + "//" + window.location.hostname + ":8081/";
44

5+
// Used for development
6+
if (window.location.protocol === "file:") {
7+
requestUrl = "http://localhost:8081/"
8+
}
9+
510
// To prohibit multiple requests at the same time
611
var requestPending = false;
712

@@ -320,4 +325,4 @@ function divRestorePlaceholder(element) {
320325
if (element.innerHTML === "<br>" || element.innerHTML === "<div><br></div>") {
321326
element.innerHTML = "";
322327
}
323-
}
328+
}

0 commit comments

Comments
 (0)