diff --git a/.env.example b/.env.example index 07454f9d..044db863 100644 --- a/.env.example +++ b/.env.example @@ -4,6 +4,11 @@ LOG_EVENTS=false # do not link your current account when you run a dev instance (so it stays pointing at your mainnet one) AUTO_LINK_ALBY_ACCOUNT=false +# LDK trace log level +#LDK_LOG_LEVEL=2 +# Logrus debug log level +LOG_LEVEL=5 + #WORK_DIR=.data #DATABASE_URI=nwc.db #NOSTR_PRIVKEY= diff --git a/alby/alby_oauth_service.go b/alby/alby_oauth_service.go index 164672dc..4ae9ff75 100644 --- a/alby/alby_oauth_service.go +++ b/alby/alby_oauth_service.go @@ -188,7 +188,7 @@ func (svc *albyOAuthService) fetchUserToken(ctx context.Context) (*oauth2.Token, // only use the current token if it has at least 20 seconds before expiry if currentToken.Expiry.After(time.Now().Add(time.Duration(20) * time.Second)) { - logger.Logger.Info("Using existing Alby OAuth token") + logger.Logger.Debug("Using existing Alby OAuth token") return currentToken, nil } @@ -266,7 +266,7 @@ func (svc *albyOAuthService) GetBalance(ctx context.Context) (*AlbyBalance, erro return nil, err } - logger.Logger.WithFields(logrus.Fields{"balance": balance}).Info("Alby balance response") + logger.Logger.WithFields(logrus.Fields{"balance": balance}).Debug("Alby balance response") return balance, nil } @@ -386,7 +386,7 @@ func (svc *albyOAuthService) SendPayment(ctx context.Context, invoice string) er "invoice": invoice, "paymentHash": responsePayload.PaymentHash, "preimage": responsePayload.Preimage, - }).Info("Payment successful") + }).Info("Alby Payment successful") return nil } @@ -841,7 +841,7 @@ func (svc *albyOAuthService) GetChannelPeerSuggestions(ctx context.Context) ([]C } } - logger.Logger.WithFields(logrus.Fields{"channel_suggestions": suggestions}).Info("Alby channel peer suggestions response") + logger.Logger.WithFields(logrus.Fields{"channel_suggestions": suggestions}).Debug("Alby channel peer suggestions response") return suggestions, nil } @@ -1082,7 +1082,7 @@ func (svc *albyOAuthService) getLSPInfo(ctx context.Context, url string) (pubkey // make sure it's a valid IPv4 URI regex := regexp.MustCompile(`^([0-9a-f]+)@([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+):([0-9]+)$`) parts := regex.FindStringSubmatch(uri) - logger.Logger.WithField("parts", parts).Info("Split URI") + logger.Logger.WithField("parts", parts).Debug("Split URI") if parts == nil || len(parts) != 4 { logger.Logger.WithField("parts", parts).Error("Unsupported URI") return "", "", uint16(0), errors.New("could not decode LSP URI") diff --git a/api/lsp.go b/api/lsp.go index a66f5210..d8818dda 100644 --- a/api/lsp.go +++ b/api/lsp.go @@ -104,7 +104,7 @@ func (api *api) RequestLSPOrder(ctx context.Context, request *LSPOrderRequest) ( logger.Logger.WithFields(logrus.Fields{ "newChannelResponse": newChannelResponse, - }).Info("New Channel response") + }).Debug("New Channel response") return newChannelResponse, nil } diff --git a/cmd/http/main.go b/cmd/http/main.go index 328fb465..60abfd30 100644 --- a/cmd/http/main.go +++ b/cmd/http/main.go @@ -9,7 +9,6 @@ import ( "syscall" "time" - echologrus "github.com/davrux/echo-logrus/v4" "github.com/getAlby/hub/http" "github.com/getAlby/hub/logger" "github.com/getAlby/hub/service" @@ -28,7 +27,6 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) svc, _ := service.NewService(ctx) - echologrus.Logger = logger.Logger e := echo.New() //register shared routes diff --git a/events/events.go b/events/events.go index 513f866a..19c65cdb 100644 --- a/events/events.go +++ b/events/events.go @@ -46,7 +46,7 @@ func (ep *eventPublisher) RemoveSubscriber(listenerToRemove EventSubscriber) { func (ep *eventPublisher) Publish(event *Event) { ep.subscriberMtx.Lock() defer ep.subscriberMtx.Unlock() - logger.Logger.WithFields(logrus.Fields{"event": event, "global": ep.globalProperties}).Info("Publishing event") + logger.Logger.WithFields(logrus.Fields{"event": event, "global": ep.globalProperties}).Debug("Publishing event") for _, listener := range ep.listeners { // events are consumed in sequence as some listeners depend on earlier consumers // (e.g. NIP-47 notifier depends on transactions service updating transactions) diff --git a/go.mod b/go.mod index 4a5e4d68..1b20c776 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.22.2 require ( github.com/adrg/xdg v0.5.0 github.com/breez/breez-sdk-go v0.3.4 - github.com/davrux/echo-logrus/v4 v4.0.3 github.com/elnosh/gonuts v0.1.1-0.20240602162005-49da741613e4 github.com/getAlby/glalby-go v0.0.0-20240621192717-95673c864d59 github.com/getAlby/ldk-node-go v0.0.0-20240801181008-94e3b8403ad3 diff --git a/go.sum b/go.sum index 3393f62b..0e11c02b 100644 --- a/go.sum +++ b/go.sum @@ -136,8 +136,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davrux/echo-logrus/v4 v4.0.3 h1:V5bM43A+3PNdpiGC2TS8HKAeaUWQph/j8utG7/mwQ5w= -github.com/davrux/echo-logrus/v4 v4.0.3/go.mod h1:+1y03d0joOKfwnPN4GSFhh/ViG3newZtYZfAPB6yf+g= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= @@ -147,7 +145,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3 github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/decred/dcrd/lru v1.1.2 h1:KdCzlkxppuoIDGEvCGah1fZRicrDH36IipvlB1ROkFY= github.com/decred/dcrd/lru v1.1.2/go.mod h1:gEdCVgXs1/YoBvFWt7Scgknbhwik3FgVSzlnCcXL2N8= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dhui/dktest v0.4.0 h1:z05UmuXZHO/bgj/ds2bGMBu8FI4WA+Ag/m3ghL+om7M= github.com/dhui/dktest v0.4.0/go.mod h1:v/Dbz1LgCBOi2Uki2nUqLBGa83hWBGFMu5MrgMDCc78= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= @@ -397,13 +394,10 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= github.com/labstack/echo-contrib v0.17.1 h1:7I/he7ylVKsDUieaGRZ9XxxTYOjfQwVzHzUYrNykfCU= github.com/labstack/echo-contrib v0.17.1/go.mod h1:SnsCZtwHBAZm5uBSAtQtXQHI3wqEA73hvTn0bYMKnZA= -github.com/labstack/echo/v4 v4.1.13/go.mod h1:3WZNypykZ3tnqpF2Qb4fPg27XDunFqgP3HGDmCMgv7U= github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0= github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc= @@ -463,16 +457,11 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= @@ -641,8 +630,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7 github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/wailsapp/go-webview2 v1.0.10 h1:PP5Hug6pnQEAhfRzLCoOh2jJaPdrqeRgJKZhyYyDV/w= @@ -733,8 +720,6 @@ golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -766,8 +751,6 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -811,9 +794,7 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/http/http_service.go b/http/http_service.go index 621947d4..aec91b8b 100644 --- a/http/http_service.go +++ b/http/http_service.go @@ -8,11 +8,11 @@ import ( "strconv" "strings" - echologrus "github.com/davrux/echo-logrus/v4" "github.com/gorilla/sessions" "github.com/labstack/echo-contrib/session" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" + "github.com/sirupsen/logrus" "gorm.io/gorm" "github.com/getAlby/hub/config" @@ -59,7 +59,27 @@ func (httpSvc *HttpService) validateUserMiddleware(next echo.HandlerFunc) echo.H func (httpSvc *HttpService) RegisterSharedRoutes(e *echo.Echo) { e.HideBanner = true - e.Use(echologrus.Middleware()) + + e.Use(middleware.RequestLoggerWithConfig(middleware.RequestLoggerConfig{ + LogURI: true, + LogStatus: true, + LogRemoteIP: true, + LogUserAgent: true, + LogHost: true, + LogRequestID: true, + LogValuesFunc: func(c echo.Context, values middleware.RequestLoggerValues) error { + logger.Logger.WithFields(logrus.Fields{ + "uri": values.URI, + "status": values.Status, + "remote_ip": values.RemoteIP, + "user_agent": values.UserAgent, + "host": values.Host, + "request_id": values.RequestID, + }).Info("handled API request") + return nil + }, + })) + e.Use(middleware.Recover()) e.Use(middleware.RequestID()) e.Use(middleware.CSRFWithConfig(middleware.CSRFConfig{ diff --git a/lnclient/cashu/cashu.go b/lnclient/cashu/cashu.go index 063d6d1e..fe9d50f9 100644 --- a/lnclient/cashu/cashu.go +++ b/lnclient/cashu/cashu.go @@ -327,7 +327,7 @@ func (cs *CashuService) checkInvoice(cashuInvoice *storage.Invoice) { if cashuInvoice.TransactionType == storage.Mint && !cashuInvoice.Paid { logger.Logger.WithFields(logrus.Fields{ "paymentHash": cashuInvoice.PaymentHash, - }).Info("Checking unpaid invoice") + }).Debug("Checking unpaid invoice") proofs, err := cs.wallet.MintTokens(cashuInvoice.Id) if err != nil { diff --git a/lnclient/greenlight/greenlight.go b/lnclient/greenlight/greenlight.go index a8b3e2e4..6c33428b 100644 --- a/lnclient/greenlight/greenlight.go +++ b/lnclient/greenlight/greenlight.go @@ -483,7 +483,7 @@ func (gs *GreenlightService) GetNewOnchainAddress(ctx context.Context) (string, func (gs *GreenlightService) GetOnchainBalance(ctx context.Context) (*lnclient.OnchainBalanceResponse, error) { response, err := gs.client.ListFunds(glalby.ListFundsRequest{}) - logger.Logger.WithField("response", response).Info("Listed funds") + logger.Logger.WithField("response", response).Debug("Listed funds") if err != nil { logger.Logger.Errorf("Failed to list funds: %v", err) diff --git a/lnclient/ldk/ldk.go b/lnclient/ldk/ldk.go index a459a83f..ef002f9c 100644 --- a/lnclient/ldk/ldk.go +++ b/lnclient/ldk/ldk.go @@ -263,7 +263,7 @@ func NewLDKService(ctx context.Context, cfg config.Config, eventPublisher events case <-time.After(MIN_SYNC_INTERVAL): ls.syncing = true // always update fee rates to avoid differences in fee rates with channel partners - logger.Logger.Info("Updating fee estimates") + logger.Logger.Debug("Updating fee estimates") err = node.UpdateFeeEstimates() if err != nil { logger.Logger.WithError(err).Error("Failed to update fee estimates") @@ -283,7 +283,7 @@ func NewLDKService(ctx context.Context, cfg config.Config, eventPublisher events continue } - logger.Logger.Info("Starting background wallet sync") + logger.Logger.Debug("Starting background wallet sync") syncStartTime := time.Now() err = node.SyncWallets() @@ -319,7 +319,7 @@ func NewLDKService(ctx context.Context, cfg config.Config, eventPublisher events func (ls *LDKService) Shutdown() error { if ls.node == nil { - logger.Logger.Info("LDK client already shut down") + logger.Logger.Debug("LDK client already shut down") return nil } // make sure nothing else can use it @@ -331,7 +331,7 @@ func (ls *LDKService) Shutdown() error { ls.cancel() for ls.syncing { - logger.Logger.Info("Waiting for background sync to finish before stopping LDK node...") + logger.Logger.Warn("Waiting for background sync to finish before stopping LDK node...") time.Sleep(1 * time.Second) } @@ -353,7 +353,7 @@ func (ls *LDKService) Shutdown() error { logger.Logger.Error("Timeout shutting down LDK node after 120 seconds") } - logger.Logger.Info("Destroying node object") + logger.Logger.Debug("Destroying LDK node object") node.Destroy() ls.resetRouterInternal() @@ -1430,7 +1430,7 @@ func (ls *LDKService) GetStorageDir() (string, error) { } func deleteOldLDKLogs(ldkLogDir string) { - logger.Logger.WithField("ldkLogDir", ldkLogDir).Info("Deleting old LDK logs") + logger.Logger.WithField("ldkLogDir", ldkLogDir).Debug("Deleting old LDK logs") files, err := os.ReadDir(ldkLogDir) if err != nil { logger.Logger.WithField("path", ldkLogDir).WithError(err).Error("Failed to list ldk log directory")