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.

28 lines
799 B

  1. package clients
  2. import (
  3. log "github.com/sirupsen/logrus"
  4. )
  5. // CryptoMachineLogger wraps around the usual logger, implementing the Logger interface needed by OlmMachine.
  6. type CryptoMachineLogger struct{}
  7. // Error formats and logs an error message.
  8. func (CryptoMachineLogger) Error(message string, args ...interface{}) {
  9. log.Errorf(message, args...)
  10. }
  11. // Warn formats and logs a warning message.
  12. func (CryptoMachineLogger) Warn(message string, args ...interface{}) {
  13. log.Warnf(message, args...)
  14. }
  15. // Debug formats and logs a debug message.
  16. func (CryptoMachineLogger) Debug(message string, args ...interface{}) {
  17. log.Debugf(message, args...)
  18. }
  19. // Trace formats and logs a trace message.
  20. func (CryptoMachineLogger) Trace(message string, args ...interface{}) {
  21. log.Tracef(message, args...)
  22. }