Documentation
¶
Overview ¶
Package joblogger is used to handle job logs
Index ¶
- type LogBuffer
- type Logger
- type MockLogger
- func (_m *MockLogger) Close()
- func (_m *MockLogger) Errorf(format string, a ...interface{})
- func (_m *MockLogger) Flush()
- func (_m *MockLogger) Infof(format string, a ...interface{})
- func (_m *MockLogger) Start()
- func (_m *MockLogger) Warningf(format string, a ...interface{})
- func (_m *MockLogger) Write(data []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogBuffer ¶
type LogBuffer struct {
// contains filtered or unexported fields
}
LogBuffer stores logs in a file and limits the amount of logs written
type Logger ¶
type Logger interface { // Close flushes the logger Close() // Infof writes an info log to the job's log output Infof(format string, a ...interface{}) // Errorf writes an error log to the job's log output Errorf(format string, a ...interface{}) // Warningf writes a warning log to the job's log output Warningf(format string, a ...interface{}) // Write will append the data to the log buffer Write(data []byte) (n int, err error) // Start starts the logger Start() // Flush flushes the logger Flush() }
Logger is an interface for logging job output
type MockLogger ¶
MockLogger is an autogenerated mock type for the Logger type
func NewMockLogger ¶
func NewMockLogger(t mockConstructorTestingTNewMockLogger) *MockLogger
NewMockLogger creates a new instance of MockLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockLogger) Close ¶
func (_m *MockLogger) Close()
Close provides a mock function with given fields:
func (*MockLogger) Errorf ¶
func (_m *MockLogger) Errorf(format string, a ...interface{})
Errorf provides a mock function with given fields: format, a
func (*MockLogger) Flush ¶
func (_m *MockLogger) Flush()
Flush provides a mock function with given fields:
func (*MockLogger) Infof ¶
func (_m *MockLogger) Infof(format string, a ...interface{})
Infof provides a mock function with given fields: format, a
func (*MockLogger) Start ¶
func (_m *MockLogger) Start()
Start provides a mock function with given fields:
func (*MockLogger) Warningf ¶ added in v0.30.0
func (_m *MockLogger) Warningf(format string, a ...interface{})
Warningf provides a mock function with given fields: format, a