/
logger.go
99 lines (82 loc) · 2.59 KB
/
logger.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Code generated by mockery v2.33.2. DO NOT EDIT.
package mocks
import (
types "github.com/aws-controllers-k8s/runtime/pkg/types"
mock "github.com/stretchr/testify/mock"
)
// Logger is an autogenerated mock type for the Logger type
type Logger struct {
mock.Mock
}
// Debug provides a mock function with given fields: msg, additionalValues
func (_m *Logger) Debug(msg string, additionalValues ...interface{}) {
var _ca []interface{}
_ca = append(_ca, msg)
_ca = append(_ca, additionalValues...)
_m.Called(_ca...)
}
// Enter provides a mock function with given fields: name, additionalValues
func (_m *Logger) Enter(name string, additionalValues ...interface{}) {
var _ca []interface{}
_ca = append(_ca, name)
_ca = append(_ca, additionalValues...)
_m.Called(_ca...)
}
// Exit provides a mock function with given fields: name, err, additionalValues
func (_m *Logger) Exit(name string, err error, additionalValues ...interface{}) {
var _ca []interface{}
_ca = append(_ca, name, err)
_ca = append(_ca, additionalValues...)
_m.Called(_ca...)
}
// Info provides a mock function with given fields: msg, additionalValues
func (_m *Logger) Info(msg string, additionalValues ...interface{}) {
var _ca []interface{}
_ca = append(_ca, msg)
_ca = append(_ca, additionalValues...)
_m.Called(_ca...)
}
// IsDebugEnabled provides a mock function with given fields:
func (_m *Logger) IsDebugEnabled() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// Trace provides a mock function with given fields: name, additionalValues
func (_m *Logger) Trace(name string, additionalValues ...interface{}) types.TraceExiter {
var _ca []interface{}
_ca = append(_ca, name)
_ca = append(_ca, additionalValues...)
ret := _m.Called(_ca...)
var r0 types.TraceExiter
if rf, ok := ret.Get(0).(func(string, ...interface{}) types.TraceExiter); ok {
r0 = rf(name, additionalValues...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(types.TraceExiter)
}
}
return r0
}
// WithValues provides a mock function with given fields: _a0
func (_m *Logger) WithValues(_a0 ...interface{}) {
var _ca []interface{}
_ca = append(_ca, _a0...)
_m.Called(_ca...)
}
// NewLogger creates a new instance of Logger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewLogger(t interface {
mock.TestingT
Cleanup(func())
}) *Logger {
mock := &Logger{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}