Documentation ¶
Index ¶
- func Debug(fm string, v ...interface{})
- func Error(fm string, v ...interface{})
- func Fatal(fm string, v ...interface{})
- func Info(fm string, v ...interface{})
- func Log(lv LogLevel, fm string, v ...interface{})
- func LogString(lv LogLevel) string
- func New(m LogMap, lv LogLevel, only bool) *logger
- func SetLogLevel(lv LogLevel)
- func SetOnly(only bool)
- func Warn(fm string, v ...interface{})
- type LogLevel
- type LogMap
- type Logger
- type MockLogger
- func (_m *MockLogger) Debug(_param0 string, _param1 ...interface{})
- func (_m *MockLogger) EXPECT() *_MockLoggerRecorder
- func (_m *MockLogger) Error(_param0 string, _param1 ...interface{})
- func (_m *MockLogger) Fatal(_param0 string, _param1 ...interface{})
- func (_m *MockLogger) Info(_param0 string, _param1 ...interface{})
- func (_m *MockLogger) Log(_param0 LogLevel, _param1 string, _param2 ...interface{})
- func (_m *MockLogger) SetLogLevel(_param0 LogLevel)
- func (_m *MockLogger) SetOnly(_param0 bool)
- func (_m *MockLogger) Warn(_param0 string, _param1 ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLogLevel ¶
func SetLogLevel(lv LogLevel)
Types ¶
type Logger ¶
type Logger interface { // Log at a given level Log(LogLevel, string, ...interface{}) // Log at level 3 Debug(string, ...interface{}) // Log at level 2 Info(string, ...interface{}) // Log at level 1 Warn(string, ...interface{}) // Log at level 0 Error(string, ...interface{}) // Log at level -1, to STDERR always, and exit after logging. Fatal(string, ...interface{}) // Change the current log display level SetLogLevel(LogLevel) // Set the logger to only output the current level SetOnly(bool) }
func InitFromFlags ¶
func InitFromFlags() Logger
type MockLogger ¶
type MockLogger struct {
// contains filtered or unexported fields
}
Mock of Logger interface
func NewMockLogger ¶
func NewMockLogger(ctrl *gomock.Controller) *MockLogger
func (*MockLogger) Debug ¶
func (_m *MockLogger) Debug(_param0 string, _param1 ...interface{})
func (*MockLogger) EXPECT ¶
func (_m *MockLogger) EXPECT() *_MockLoggerRecorder
func (*MockLogger) Error ¶
func (_m *MockLogger) Error(_param0 string, _param1 ...interface{})
func (*MockLogger) Fatal ¶
func (_m *MockLogger) Fatal(_param0 string, _param1 ...interface{})
func (*MockLogger) Info ¶
func (_m *MockLogger) Info(_param0 string, _param1 ...interface{})
func (*MockLogger) Log ¶
func (_m *MockLogger) Log(_param0 LogLevel, _param1 string, _param2 ...interface{})
func (*MockLogger) SetLogLevel ¶
func (_m *MockLogger) SetLogLevel(_param0 LogLevel)
func (*MockLogger) SetOnly ¶
func (_m *MockLogger) SetOnly(_param0 bool)
func (*MockLogger) Warn ¶
func (_m *MockLogger) Warn(_param0 string, _param1 ...interface{})
Click to show internal directories.
Click to hide internal directories.