Documentation ¶
Overview ¶
Package logging provides logging functionalities for GoFr applications.
Index ¶
- type Level
- type Logger
- type MockLogger
- func (m *MockLogger) ChangeLevel(level Level)
- func (m *MockLogger) Debug(args ...interface{})
- func (m *MockLogger) Debugf(format string, args ...interface{})
- func (m *MockLogger) Error(args ...interface{})
- func (m *MockLogger) Errorf(format string, args ...interface{})
- func (m *MockLogger) Fatal(args ...interface{})
- func (m *MockLogger) Fatalf(format string, args ...interface{})
- func (m *MockLogger) Info(args ...interface{})
- func (m *MockLogger) Infof(format string, args ...interface{})
- func (m *MockLogger) Log(args ...interface{})
- func (m *MockLogger) Logf(format string, args ...interface{})
- func (m *MockLogger) Notice(args ...interface{})
- func (m *MockLogger) Noticef(format string, args ...interface{})
- func (m *MockLogger) Warn(args ...interface{})
- func (m *MockLogger) Warnf(format string, args ...interface{})
- type PrettyPrint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int
Level represents different logging levels.
func GetLevelFromString ¶
GetLevelFromString converts a string to a logging level.
func (Level) MarshalJSON ¶
type Logger ¶
type Logger interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Log(args ...interface{}) Logf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Notice(args ...interface{}) Noticef(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) ChangeLevel(level Level) }
Logger represents a logging interface.
func NewFileLogger ¶ added in v1.1.1
NewFileLogger creates a new logger instance with logging to a file.
func NewMockLogger ¶ added in v1.6.0
type MockLogger ¶ added in v1.6.0
type MockLogger struct {
// contains filtered or unexported fields
}
func (*MockLogger) ChangeLevel ¶ added in v1.6.0
func (m *MockLogger) ChangeLevel(level Level)
func (*MockLogger) Debug ¶ added in v1.6.0
func (m *MockLogger) Debug(args ...interface{})
func (*MockLogger) Debugf ¶ added in v1.6.0
func (m *MockLogger) Debugf(format string, args ...interface{})
func (*MockLogger) Error ¶ added in v1.6.0
func (m *MockLogger) Error(args ...interface{})
func (*MockLogger) Errorf ¶ added in v1.6.0
func (m *MockLogger) Errorf(format string, args ...interface{})
func (*MockLogger) Fatal ¶ added in v1.6.0
func (m *MockLogger) Fatal(args ...interface{})
func (*MockLogger) Fatalf ¶ added in v1.6.0
func (m *MockLogger) Fatalf(format string, args ...interface{})
func (*MockLogger) Info ¶ added in v1.6.0
func (m *MockLogger) Info(args ...interface{})
func (*MockLogger) Infof ¶ added in v1.6.0
func (m *MockLogger) Infof(format string, args ...interface{})
func (*MockLogger) Log ¶ added in v1.6.0
func (m *MockLogger) Log(args ...interface{})
func (*MockLogger) Logf ¶ added in v1.6.0
func (m *MockLogger) Logf(format string, args ...interface{})
func (*MockLogger) Notice ¶ added in v1.6.0
func (m *MockLogger) Notice(args ...interface{})
func (*MockLogger) Noticef ¶ added in v1.6.0
func (m *MockLogger) Noticef(format string, args ...interface{})
func (*MockLogger) Warn ¶ added in v1.6.0
func (m *MockLogger) Warn(args ...interface{})
func (*MockLogger) Warnf ¶ added in v1.6.0
func (m *MockLogger) Warnf(format string, args ...interface{})
type PrettyPrint ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.