-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sotw][issue-540] Return full state when applicable for watches in li…
…near cache Signed-off-by: Valerian Roche <valerian.roche@datadoghq.com>
- Loading branch information
1 parent
9273570
commit d6ec809
Showing
4 changed files
with
177 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package log | ||
|
||
import "testing" | ||
|
||
type testLogger struct { | ||
t testing.TB | ||
} | ||
|
||
var _ Logger = &testLogger{} | ||
|
||
func NewTestLogger(t testing.TB) *testLogger { | ||
return &testLogger{t} | ||
} | ||
|
||
// Debugf logs a message at level debug on the test logger. | ||
func (l *testLogger) Debugf(msg string, args ...interface{}) { | ||
l.t.Logf("[debug] "+msg, args...) | ||
} | ||
|
||
// Infof logs a message at level info on the test logger. | ||
func (l *testLogger) Infof(msg string, args ...interface{}) { | ||
l.t.Logf("[info] "+msg, args...) | ||
} | ||
|
||
// Warnf logs a message at level warn on the test logger. | ||
func (l *testLogger) Warnf(msg string, args ...interface{}) { | ||
l.t.Logf("[warn] "+msg, args...) | ||
} | ||
|
||
// Errorf logs a message at level error on the test logger. | ||
func (l *testLogger) Errorf(msg string, args ...interface{}) { | ||
l.t.Logf("[error] "+msg, args...) | ||
} |