binarylog: generalize binarylog's MethodLogger preparing for new observability features (#5244)

This commit is contained in:
Lidi Zheng
2022-03-21 14:00:02 -07:00
committed by GitHub
parent 63bdcbcce5
commit 1ffd63de37
5 changed files with 38 additions and 21 deletions

View File

@ -93,7 +93,7 @@ func (s) TestGetMethodLogger(t *testing.T) {
t.Errorf("in: %q, failed to create logger from config string", tc.in)
continue
}
ml := l.getMethodLogger(tc.method)
ml := l.GetMethodLogger(tc.method).(*methodLogger)
if ml == nil {
t.Errorf("in: %q, method logger is nil, want non-nil", tc.in)
continue
@ -149,7 +149,7 @@ func (s) TestGetMethodLoggerOff(t *testing.T) {
t.Errorf("in: %q, failed to create logger from config string", tc.in)
continue
}
ml := l.getMethodLogger(tc.method)
ml := l.GetMethodLogger(tc.method)
if ml != nil {
t.Errorf("in: %q, method logger is non-nil, want nil", tc.in)
}