forked from ava-labs/avalanchego
/
test_log.go
74 lines (50 loc) · 1.6 KB
/
test_log.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package logging
import (
"errors"
)
var (
errNoLoggerWrite = errors.New("NoLogger can't write")
)
// NoLog ...
type NoLog struct{}
func (NoLog) Write([]byte) (int, error) { return 0, errNoLoggerWrite }
// Fatal ...
func (NoLog) Fatal(format string, args ...interface{}) {}
// Error ...
func (NoLog) Error(format string, args ...interface{}) {}
// Warn ...
func (NoLog) Warn(format string, args ...interface{}) {}
// Info ...
func (NoLog) Info(format string, args ...interface{}) {}
// Debug ...
func (NoLog) Debug(format string, args ...interface{}) {}
// Verbo ...
func (NoLog) Verbo(format string, args ...interface{}) {}
// AssertNoError ...
func (NoLog) AssertNoError(error) {}
// AssertTrue ...
func (NoLog) AssertTrue(b bool, format string, args ...interface{}) {}
// AssertDeferredTrue ...
func (NoLog) AssertDeferredTrue(f func() bool, format string, args ...interface{}) {}
// AssertDeferredNoError ...
func (NoLog) AssertDeferredNoError(f func() error) {}
// StopOnPanic ...
func (NoLog) StopOnPanic() {}
// RecoverAndPanic ...
func (NoLog) RecoverAndPanic(f func()) { f() }
// Stop ...
func (NoLog) Stop() {}
// SetLogLevel ...
func (NoLog) SetLogLevel(Level) {}
// SetDisplayLevel ...
func (NoLog) SetDisplayLevel(Level) {}
// SetPrefix ...
func (NoLog) SetPrefix(string) {}
// SetLoggingEnabled ...
func (NoLog) SetLoggingEnabled(bool) {}
// SetDisplayingEnabled ...
func (NoLog) SetDisplayingEnabled(bool) {}
// SetContextualDisplayingEnabled ...
func (NoLog) SetContextualDisplayingEnabled(bool) {}