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

lightningnetwork / lnd / 11219354629

07 Oct 2024 03:56PM UTC coverage: 58.585% (-0.2%) from 58.814%
11219354629

Pull #9147

github

ziggie1984
fixup! sqlc: migration up script for payments.
Pull Request #9147: [Part 1|3] Introduce SQL Payment schema into LND

130227 of 222287 relevant lines covered (58.59%)

29106.19 hits per line

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

85.0
/channeldb/log.go
1
package channeldb
2

3
import (
4
        "github.com/btcsuite/btclog"
5
        "github.com/lightningnetwork/lnd/build"
6
        mig "github.com/lightningnetwork/lnd/channeldb/migration"
7
        "github.com/lightningnetwork/lnd/channeldb/migration12"
8
        "github.com/lightningnetwork/lnd/channeldb/migration13"
9
        "github.com/lightningnetwork/lnd/channeldb/migration16"
10
        "github.com/lightningnetwork/lnd/channeldb/migration24"
11
        "github.com/lightningnetwork/lnd/channeldb/migration30"
12
        "github.com/lightningnetwork/lnd/channeldb/migration31"
13
        "github.com/lightningnetwork/lnd/channeldb/migration32"
14
        "github.com/lightningnetwork/lnd/channeldb/migration_01_to_11"
15
        "github.com/lightningnetwork/lnd/kvdb"
16
)
17

18
// log is a logger that is initialized with no output filters.  This
19
// means the package will not perform any logging by default until the caller
20
// requests it.
21
var log btclog.Logger
22

23
func init() {
24
        UseLogger(build.NewSubLogger("CHDB", nil))
48✔
25
}
48✔
26

48✔
27
// DisableLog disables all library log output.  Logging output is disabled
28
// by default until UseLogger is called.
29
func DisableLog() {
30
        UseLogger(btclog.Disabled)
×
31
}
×
32

×
33
// UseLogger uses a specified Logger to output package logging info.
34
// This should be used in preference to SetLogWriter if the caller is also
35
// using btclog.
36
func UseLogger(logger btclog.Logger) {
37
        log = logger
48✔
38
        mig.UseLogger(logger)
48✔
39
        migration_01_to_11.UseLogger(logger)
48✔
40
        migration12.UseLogger(logger)
48✔
41
        migration13.UseLogger(logger)
48✔
42
        migration16.UseLogger(logger)
48✔
43
        migration24.UseLogger(logger)
48✔
44
        migration30.UseLogger(logger)
48✔
45
        migration31.UseLogger(logger)
48✔
46
        migration32.UseLogger(logger)
48✔
47
        kvdb.UseLogger(logger)
48✔
48
}
48✔
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