Documentation
¶
Index ¶
- type LogLevel
- type Logger
- func (l *Logger) Debug(format string, v ...interface{})
- func (l *Logger) Error(format string, v ...interface{})
- func (l *Logger) GetLogLevel() LogLevel
- func (l *Logger) GetStats() map[string]interface{}
- func (l *Logger) GetUptime() time.Duration
- func (l *Logger) Info(format string, v ...interface{})
- func (l *Logger) LogError(err error, context string)
- func (l *Logger) LogRequest(method, path, remoteAddr string, statusCode int, duration time.Duration)
- func (l *Logger) SetLogLevel(level LogLevel)
- func (l *Logger) SetLogLevelFromString(levelStr string) error
- func (l *Logger) Warning(format string, v ...interface{})
- func (l *Logger) WithField(key, value string) *Logger
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
}
Logger provides structured logging functionality
func GetGlobalLogger ¶
func GetGlobalLogger() *Logger
GetGlobalLogger returns the global logger instance
func (*Logger) GetLogLevel ¶
GetLogLevel returns the current log level
func (*Logger) LogRequest ¶
func (l *Logger) LogRequest(method, path, remoteAddr string, statusCode int, duration time.Duration)
LogRequest logs an HTTP request
func (*Logger) SetLogLevel ¶
SetLogLevel sets the minimum log level
func (*Logger) SetLogLevelFromString ¶
SetLogLevelFromString sets the log level from a string
Click to show internal directories.
Click to hide internal directories.