Some checks are pending
docker-build-cometbft / vars (push) Waiting to run
docker-build-cometbft / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-cometbft / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-cometbft / merge-images (push) Blocked by required conditions
docker-build-e2e-node / vars (push) Waiting to run
docker-build-e2e-node / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-e2e-node / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-e2e-node / merge-images (push) Blocked by required conditions
30 lines
760 B
Go
30 lines
760 B
Go
package log
|
|
|
|
import (
|
|
"io"
|
|
|
|
kitlog "github.com/go-kit/log"
|
|
)
|
|
|
|
// Logger is what any CometBFT library should take.
|
|
type Logger interface {
|
|
Debug(msg string, keyvals ...interface{})
|
|
Info(msg string, keyvals ...interface{})
|
|
Error(msg string, keyvals ...interface{})
|
|
|
|
With(keyvals ...interface{}) Logger
|
|
}
|
|
|
|
// NewSyncWriter returns a new writer that is safe for concurrent use by
|
|
// multiple goroutines. Writes to the returned writer are passed on to w. If
|
|
// another write is already in progress, the calling goroutine blocks until
|
|
// the writer is available.
|
|
//
|
|
// If w implements the following interface, so does the returned writer.
|
|
//
|
|
// interface {
|
|
// Fd() uintptr
|
|
// }
|
|
func NewSyncWriter(w io.Writer) io.Writer {
|
|
return kitlog.NewSyncWriter(w)
|
|
}
|