Documentation
¶
Index ¶
- func Any(key string, val interface{}) zap.Field
- func Bool(key string, val bool) zap.Field
- func Duration(key string, val time.Duration) zap.Field
- func Error(err error) zap.Field
- func Float64(key string, val float64) zap.Field
- func Int(key string, val int) zap.Field
- func Int64(key string, val int64) zap.Field
- func String(key, val string) zap.Field
- type Logger
- func (l *Logger) Debug(msg string, fields ...zap.Field)
- func (l *Logger) Error(msg string, err error, fields ...zap.Field)
- func (l *Logger) Fatal(msg string, fields ...zap.Field)
- func (l *Logger) Info(msg string, fields ...zap.Field)
- func (l *Logger) LogConfigLoad(path string, err error)
- func (l *Logger) LogGatewayStart(port int)
- func (l *Logger) LogGatewayStop()
- func (l *Logger) LogPluginEvent(pluginName, event string, err error)
- func (l *Logger) LogRequest(method, path string, statusCode int, duration float64)
- func (l *Logger) Sync() error
- func (l *Logger) Warn(msg string, fields ...zap.Field)
- func (l *Logger) With(fields ...zap.Field) *Logger
- func (l *Logger) WithContext(ctx map[string]interface{}) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger wraps zap.Logger for structured logging
func NewLoggerFromEnv ¶
func NewLoggerFromEnv() *Logger
NewLoggerFromEnv creates a logger based on environment variables
func (*Logger) LogConfigLoad ¶
func (*Logger) LogGatewayStart ¶
func (*Logger) LogGatewayStop ¶
func (l *Logger) LogGatewayStop()
func (*Logger) LogPluginEvent ¶
func (*Logger) LogRequest ¶
Helper functions for common logging patterns
func (*Logger) WithContext ¶
WithContext creates a logger with request context
Click to show internal directories.
Click to hide internal directories.