move implementation to internal/ directory (#828)

This commit is contained in:
Christian Schwarz
2024-10-18 19:21:17 +02:00
committed by GitHub
parent b9b9ad10cf
commit 908807bd59
360 changed files with 507 additions and 507 deletions

View File

@@ -0,0 +1,28 @@
package logger
import (
"testing"
)
type testLogger struct {
Logger
}
type testingLoggerOutlet struct {
t *testing.T
}
func (o testingLoggerOutlet) WriteEntry(entry Entry) error {
o.t.Logf("%#v", entry)
return nil
}
var _ Logger = testLogger{}
func NewTestLogger(t *testing.T) Logger {
outlets := NewOutlets()
outlets.Add(&testingLoggerOutlet{t}, Debug)
return &testLogger{
Logger: NewLogger(outlets, 0),
}
}