-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoop.go
More file actions
28 lines (19 loc) · 784 Bytes
/
noop.go
File metadata and controls
28 lines (19 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package ctxd
import "context"
// NoOpLogger is a contextualized logger stub.
type NoOpLogger struct{}
var _ Logger = NoOpLogger{}
// Debug discards debug message.
func (NoOpLogger) Debug(_ context.Context, _ string, _ ...interface{}) {}
// Info discards informational message.
func (NoOpLogger) Info(_ context.Context, _ string, _ ...interface{}) {}
// Important discards important message.
func (NoOpLogger) Important(_ context.Context, _ string, _ ...interface{}) {}
// Warn discards warning message.
func (NoOpLogger) Warn(_ context.Context, _ string, _ ...interface{}) {}
// Error discards error message.
func (NoOpLogger) Error(_ context.Context, _ string, _ ...interface{}) {}
// CtxdLogger is a provider.
func (NoOpLogger) CtxdLogger() Logger {
return NoOpLogger{}
}