12345678910111213141516171819202122232425262728293031 |
- package testutil
- import (
- log "unknwon.dev/clog/v2"
- )
- var _ log.Logger = (*noopLogger)(nil)
- type noopLogger struct{}
- func (l *noopLogger) Name() string {
- return "noop"
- }
- func (l *noopLogger) Level() log.Level {
- return log.LevelTrace
- }
- func (l *noopLogger) Write(log.Messager) error {
- return nil
- }
- var InitNoopLogger = func(name string, vs ...interface{}) (log.Logger, error) {
- return &noopLogger{}, nil
- }
|