Documentation ¶
Index ¶
- Constants
- func Debug(message string, fields ...zap.Field)
- func DebugCtx(ctx context.Context, message string, fields ...zap.Field)
- func Error(message string, fields ...zap.Field)
- func ErrorCtx(ctx context.Context, message string, fields ...zap.Field)
- func Fatal(message string, fields ...zap.Field)
- func FatalCtx(ctx context.Context, message string, fields ...zap.Field)
- func Info(message string, fields ...zap.Field)
- func InfoCtx(ctx context.Context, message string, fields ...zap.Field)
- func RegisterLogHandler(handler func(entry *LogEntry))
- func Setup(cfg *Config) *zap.Logger
- func Warn(message string, fields ...zap.Field)
- func WarnCtx(ctx context.Context, message string, fields ...zap.Field)
- func WithField(ctx context.Context, field zap.Field) context.Context
- func WithFields(ctx context.Context, fields ...zap.Field) context.Context
- type Config
- type LogEntry
Constants ¶
View Source
const ( LevelDefault = levelInfo EnvironmentDevelopment = "development" EnvironmentProduction = "production" EnvironmentDefault = EnvironmentProduction )
Variables ¶
This section is empty.
Functions ¶
func RegisterLogHandler ¶
func RegisterLogHandler(handler func(entry *LogEntry))
Types ¶
type Config ¶
Config is a logger configuration structure.
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) GetLogLevel ¶
Click to show internal directories.
Click to hide internal directories.