Documentation ¶
Index ¶
- type Logger
- func (l *Logger) Debug(msg string, args ...interface{})
- func (l *Logger) Error(msg string, err error, args ...interface{})
- func (l *Logger) Fatal(msg string, err error, args ...interface{})
- func (l *Logger) Info(msg string, args ...interface{})
- func (l *Logger) IsDebugEnabled() bool
- func (l *Logger) Warn(msg string, args ...interface{})
- func (l *Logger) WithOperation(operationID string) LoggerInterface
- type LoggerInterface
- type MockLogger
- func (m *MockLogger) Debug(msg string, args ...interface{})
- func (m *MockLogger) Error(msg string, err error, args ...interface{})
- func (m *MockLogger) Fatal(msg string, err error, args ...interface{})
- func (m *MockLogger) Info(msg string, args ...interface{})
- func (m *MockLogger) IsDebugEnabled() bool
- func (m *MockLogger) Warn(msg string, args ...interface{})
- func (m *MockLogger) WithOperation(operationID string) LoggerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) IsDebugEnabled ¶ added in v0.1.2
func (*Logger) WithOperation ¶
func (l *Logger) WithOperation(operationID string) LoggerInterface
type LoggerInterface ¶
type LoggerInterface interface { Debug(msg string, args ...interface{}) Info(msg string, args ...interface{}) Warn(msg string, args ...interface{}) Error(msg string, err error, args ...interface{}) Fatal(msg string, err error, args ...interface{}) WithOperation(operationID string) LoggerInterface IsDebugEnabled() bool }
type MockLogger ¶ added in v0.1.2
type MockLogger struct { // You can add more fields if needed InfoMessages []string DebugMessages []string ErrorMessages []string }
func NewMockLogger ¶ added in v0.1.2
func NewMockLogger() *MockLogger
func (*MockLogger) Debug ¶ added in v0.1.2
func (m *MockLogger) Debug(msg string, args ...interface{})
func (*MockLogger) Error ¶ added in v0.1.2
func (m *MockLogger) Error(msg string, err error, args ...interface{})
func (*MockLogger) Fatal ¶ added in v0.1.2
func (m *MockLogger) Fatal(msg string, err error, args ...interface{})
func (*MockLogger) Info ¶ added in v0.1.2
func (m *MockLogger) Info(msg string, args ...interface{})
func (*MockLogger) IsDebugEnabled ¶ added in v0.1.2
func (m *MockLogger) IsDebugEnabled() bool
func (*MockLogger) Warn ¶ added in v0.1.2
func (m *MockLogger) Warn(msg string, args ...interface{})
func (*MockLogger) WithOperation ¶ added in v0.1.2
func (m *MockLogger) WithOperation(operationID string) LoggerInterface
Click to show internal directories.
Click to hide internal directories.