mocked_logger_test.go 565 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2016 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. package api
  7. import (
  8. "time"
  9. "github.com/syncthing/syncthing/lib/logger"
  10. )
  11. type mockedLoggerRecorder struct{}
  12. func (r *mockedLoggerRecorder) Since(t time.Time) []logger.Line {
  13. return []logger.Line{
  14. {
  15. When: time.Now(),
  16. Message: "Test message",
  17. },
  18. }
  19. }
  20. func (r *mockedLoggerRecorder) Clear() {}