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

lightningnetwork / lnd / 13236757158

10 Feb 2025 08:39AM UTC coverage: 57.649% (-1.2%) from 58.815%
13236757158

Pull #9493

github

ziggie1984
lncli: for some cmds we don't replace the data of the response.

For some cmds it is not very practical to replace the json output
because we might pipe it into other commands. For example when
creating the route we want to pipe it into sendtoRoute.
Pull Request #9493: For some lncli cmds we should not replace the content with other data

0 of 9 new or added lines in 2 files covered. (0.0%)

19535 existing lines in 252 files now uncovered.

103517 of 179563 relevant lines covered (57.65%)

24878.49 hits per line

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

0.0
/build/handlers.go
1
package build
2

3
import (
4
        "os"
5

6
        "github.com/btcsuite/btclog/v2"
7
)
8

9
// NewDefaultLogHandlers returns the standard console logger and rotating log
10
// writer handlers that we generally want to use. It also applies the various
11
// config options to the loggers.
12
func NewDefaultLogHandlers(cfg *LogConfig,
UNCOV
13
        rotator *RotatingLogWriter) []btclog.Handler {
×
UNCOV
14

×
UNCOV
15
        var handlers []btclog.Handler
×
UNCOV
16

×
UNCOV
17
        consoleLogHandler := btclog.NewDefaultHandler(
×
UNCOV
18
                os.Stdout, cfg.Console.HandlerOptions()...,
×
UNCOV
19
        )
×
UNCOV
20
        logFileHandler := btclog.NewDefaultHandler(
×
UNCOV
21
                rotator, cfg.File.HandlerOptions()...,
×
UNCOV
22
        )
×
UNCOV
23

×
UNCOV
24
        maybeAddLogger := func(cmdOptionDisable bool, handler btclog.Handler) {
×
UNCOV
25
                if !cmdOptionDisable {
×
UNCOV
26
                        handlers = append(handlers, handler)
×
UNCOV
27
                }
×
28
        }
UNCOV
29
        switch LoggingType {
×
30
        case LogTypeStdOut:
×
31
                maybeAddLogger(cfg.Console.Disable, consoleLogHandler)
×
UNCOV
32
        case LogTypeDefault:
×
UNCOV
33
                maybeAddLogger(cfg.Console.Disable, consoleLogHandler)
×
UNCOV
34
                maybeAddLogger(cfg.File.Disable, logFileHandler)
×
35
        }
36

UNCOV
37
        return handlers
×
38
}
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