healthcheck: disable default healthcheck logger

Disable logging by default in the healthcheck submodule to cut
dependency on lnd/build as we are hooking the logger separately
during lnd init.
This commit is contained in:
Andras Banki-Horvath 2021-04-26 22:00:34 +02:00
parent 6d66133459
commit cee832b749
No known key found for this signature in database
GPG Key ID: 80E5375C094198D8

@ -2,7 +2,6 @@ package healthcheck
import ( import (
"github.com/btcsuite/btclog" "github.com/btcsuite/btclog"
"github.com/lightningnetwork/lnd/build"
) )
// Subsystem defines the logging code for this subsystem. // Subsystem defines the logging code for this subsystem.
@ -11,12 +10,7 @@ const Subsystem = "HLCK"
// log is a logger that is initialized with no output filters. This // log is a logger that is initialized with no output filters. This
// means the package will not perform any logging by default until the caller // means the package will not perform any logging by default until the caller
// requests it. // requests it.
var log btclog.Logger var log = btclog.Disabled
// The default amount of logging is none.
func init() {
UseLogger(build.NewSubLogger(Subsystem, nil))
}
// DisableLog disables all library log output. Logging output is disabled // DisableLog disables all library log output. Logging output is disabled
// by default until UseLogger is called. // by default until UseLogger is called.