Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions collectors/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ import (
)

var (
// Logger for lndmon's main process.
Logger btclog.Logger
// Logger for lndmon's main process. It defaults to a disabled logger
// so that it is safe to use before initLogRotator has been called

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this cause messages to be missed if the logger never successfully is able to open the log file?

// (e.g. from collector goroutines launched at construction time).
Logger btclog.Logger = btclog.Disabled

// htlcLogger is a logger for lndmon's htlc collector.
htlcLogger btclog.Logger
htlcLogger btclog.Logger = btclog.Disabled

// paymentLogger is a logger for lndmon's payments monitor.
paymentLogger btclog.Logger
paymentLogger btclog.Logger = btclog.Disabled

// watchtowerLogger is a logger for lndmon's watchtower client.
watchtowerLogger btclog.Logger
watchtowerLogger btclog.Logger = btclog.Disabled

noOpShutdownFunc = func() {}
)
Expand Down
Loading