You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
601 B

  1. package loop
  2. import (
  3. "github.com/btcsuite/btclog"
  4. "github.com/lightningnetwork/lnd/build"
  5. )
  6. // log is a logger that is initialized with no output filters. This
  7. // means the package will not perform any logging by default until the
  8. // caller requests it.
  9. var log btclog.Logger
  10. // The default amount of logging is none.
  11. func init() {
  12. UseLogger(build.NewSubLogger("LOOP", nil))
  13. }
  14. // UseLogger uses a specified Logger to output package logging info.
  15. // This should be used in preference to SetLogWriter if the caller is also
  16. // using btclog.
  17. func UseLogger(logger btclog.Logger) {
  18. log = logger
  19. }