logging
v0.0.0-20200108075445-b28f0a907533
github.com/ljpx/logging
Documentation
pkg.go.dev ↗Types
DummyLogger
type DummyLogger struct {
// contains filtered or unexported fields
}
DummyLogger is a dummy implementation of Logger that simply records the messages logged to it.
NewDummyLogger
func NewDummyLogger() *DummyLogger
NewDummyLogger creates a new, empty DummyLogger.
DummyLogger.AssertLogged
func (d *DummyLogger) AssertLogged(t test.T, format string, v ...interface{})
AssertLogged asserts that the message specified was logged to the DummyLogger.
DummyLogger.Printf
func (d *DummyLogger) Printf(format string, v ...interface{})
Printf records a message into the DummyLogger.
Logger
type Logger interface {
Printf(format string, v ...interface{})
}
Logger defines the methods that any logging type must implement. It is designed specifically to allow a *log.Logger to be resolved in dependency injection.