Documentation
¶
Index ¶
- type Config
- type ILogger
- type Logger
- func (l *Logger) Debug(ctx context.Context, msg string, fields ...zap.Field)
- func (l *Logger) Error(ctx context.Context, msg string, fields ...zap.Field)
- func (l *Logger) Fatal(ctx context.Context, msg string, fields ...zap.Field)
- func (l *Logger) Info(ctx context.Context, msg string, fields ...zap.Field)
- func (l *Logger) Panic(ctx context.Context, msg string, fields ...zap.Field)
- func (l *Logger) Warn(ctx context.Context, msg string, fields ...zap.Field)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Level zap.AtomicLevel Datadog struct { Service string Environment string // contains filtered or unexported fields } }
Config is the configuration struct for the logger.
type ILogger ¶
type ILogger interface { Info(ctx context.Context, msg string, fields ...zap.Field) Warn(ctx context.Context, msg string, fields ...zap.Field) Debug(ctx context.Context, msg string, fields ...zap.Field) Error(ctx context.Context, msg string, fields ...zap.Field) Panic(ctx context.Context, msg string, fields ...zap.Field) Fatal(ctx context.Context, msg string, fields ...zap.Field) }
ILogger is the interface that wraps the basic logging methods and automatically adds the datadog fields to the log message. Info, Warn, Debug, Error, Panic, Fatal The base logger is zap logger.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.