forked from vanadium-archive/go.v23
-
Notifications
You must be signed in to change notification settings - Fork 0
/
discard.go
51 lines (40 loc) · 1.73 KB
/
discard.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
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package logging
type discard struct{}
// Discard is an implementation of Logger that discards all input, the equivalent
// of /dev/null. Fatal*, Panic* and all management methods are also no-ops.
var Discard Logger = &discard{}
func (*discard) Info(args ...interface{}) {}
func (*discard) InfoDepth(depth int, args ...interface{}) {}
func (*discard) Infof(format string, args ...interface{}) {}
func (*discard) InfoStack(all bool) {}
func (*discard) Error(args ...interface{}) {}
func (*discard) ErrorDepth(depth int, args ...interface{}) {}
func (*discard) Errorf(format string, args ...interface{}) {}
func (*discard) Fatal(args ...interface{}) {}
func (*discard) FatalDepth(depth int, args ...interface{}) {}
func (*discard) Fatalf(format string, args ...interface{}) {}
func (*discard) Panic(args ...interface{}) {}
func (*discard) PanicDepth(depth int, args ...interface{}) {}
func (*discard) Panicf(format string, args ...interface{}) {}
func (*discard) V(level int) bool { return false }
func (*discard) VDepth(depth int, level int) bool { return false }
func (d *discard) VI(level int) interface {
Info(args ...interface{})
Infof(format string, args ...interface{})
InfoDepth(depth int, args ...interface{})
InfoStack(all bool)
} {
return d
}
func (d *discard) VIDepth(depth int, level int) interface {
Info(args ...interface{})
Infof(format string, args ...interface{})
InfoDepth(depth int, args ...interface{})
InfoStack(all bool)
} {
return d
}
func (*discard) FlushLog() {}