• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 16934057981

13 Aug 2025 10:05AM UTC coverage: 66.929% (+10.0%) from 56.955%
16934057981

push

github

web-flow
Merge pull request #9844 from ziggie1984/refactor-payments-code-03

Refactor Payment PR 3

106 of 147 new or added lines in 11 files covered. (72.11%)

62 existing lines in 7 files now uncovered.

135864 of 202997 relevant lines covered (66.93%)

21535.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/payments/db/log.go
1
package paymentsdb
2

3
import (
4
        "github.com/btcsuite/btclog/v2"
5
        "github.com/lightningnetwork/lnd/build"
6
)
7

8
// log is a logger that is initialized with no output filters.  This
9
// means the package will not perform any logging by default until the caller
10
// requests it.
11
//
12
//nolint:unused
13
var log btclog.Logger
14

15
// Subsystem defines the logging identifier for this subsystem.
16
const Subsystem = "PYDB"
17

18
// The default amount of logging is none.
19
func init() {
51✔
20
        UseLogger(build.NewSubLogger(Subsystem, nil))
51✔
21
}
51✔
22

23
// DisableLog disables all library log output.  Logging output is disabled
24
// by default until UseLogger is called.
NEW
25
func DisableLog() {
×
NEW
26
        UseLogger(btclog.Disabled)
×
NEW
27
}
×
28

29
// UseLogger uses a specified Logger to output package logging info.
30
// This should be used in preference to SetLogWriter if the caller is also
31
// using btclog.
32
func UseLogger(logger btclog.Logger) {
51✔
33
        log = logger
51✔
34
}
51✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc