forked from SagerNet/sing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnop.go
53 lines (36 loc) · 927 Bytes
/
nop.go
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package logger
import (
"context"
)
func NOP() ContextLogger {
return (*nopLogger)(nil)
}
type nopLogger struct{}
func (f *nopLogger) Trace(args ...any) {
}
func (f *nopLogger) Debug(args ...any) {
}
func (f *nopLogger) Info(args ...any) {
}
func (f *nopLogger) Warn(args ...any) {
}
func (f *nopLogger) Error(args ...any) {
}
func (f *nopLogger) Fatal(args ...any) {
}
func (f *nopLogger) Panic(args ...any) {
}
func (f *nopLogger) TraceContext(ctx context.Context, args ...any) {
}
func (f *nopLogger) DebugContext(ctx context.Context, args ...any) {
}
func (f *nopLogger) InfoContext(ctx context.Context, args ...any) {
}
func (f *nopLogger) WarnContext(ctx context.Context, args ...any) {
}
func (f *nopLogger) ErrorContext(ctx context.Context, args ...any) {
}
func (f *nopLogger) FatalContext(ctx context.Context, args ...any) {
}
func (f *nopLogger) PanicContext(ctx context.Context, args ...any) {
}