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.

30 lines
775 B

  1. package log
  2. import (
  3. "io"
  4. kitlog "github.com/go-kit/kit/log"
  5. )
  6. // Logger is what any Tendermint library should take.
  7. type Logger interface {
  8. Debug(msg string, keyvals ...interface{})
  9. Info(msg string, keyvals ...interface{})
  10. Error(msg string, keyvals ...interface{})
  11. With(keyvals ...interface{}) Logger
  12. }
  13. // NewSyncWriter returns a new writer that is safe for concurrent use by
  14. // multiple goroutines. Writes to the returned writer are passed on to w. If
  15. // another write is already in progress, the calling goroutine blocks until
  16. // the writer is available.
  17. //
  18. // If w implements the following interface, so does the returned writer.
  19. //
  20. // interface {
  21. // Fd() uintptr
  22. // }
  23. func NewSyncWriter(w io.Writer) io.Writer {
  24. return kitlog.NewSyncWriter(w)
  25. }