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

lightningnetwork / lnd / 18340726508

08 Oct 2025 09:49AM UTC coverage: 66.653%. First build
18340726508

Pull #9868

github

web-flow
Merge a988f91c8 into 30decfc3c
Pull Request #9868: Basic structures for onion messages into LND

162 of 243 new or added lines in 11 files covered. (66.67%)

137441 of 206205 relevant lines covered (66.65%)

21298.55 hits per line

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

66.67
/onionmessage/log.go
1
package onionmessage
2

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

8
// Subsystem defines the logging code for this subsystem.
9
const Subsystem = "OMSG"
10

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

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

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

27
// UseLogger uses a specified Logger to output package logging info.
28
// This should be used in preference to SetLogWriter if the caller is also
29
// using btclog.
30
func UseLogger(logger btclog.Logger) {
7✔
31
        log = logger
7✔
32
}
7✔
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