Documentation
¶
Index ¶
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Fatal(msg string, args ...any)
- func Info(msg string, args ...any)
- func InitConfig(cfg Config)
- func RequestIDFromContext(ctx context.Context) string
- func Reset()
- func SetOutput(w io.Writer)
- func ValidateCore(level, format, output, filePath string) error
- func Warn(msg string, args ...any)
- func WithExecutionContext(ctx context.Context, value ExecutionContext) context.Context
- func WithRequestID(ctx context.Context, requestID string) context.Context
- func WriteBanner(w io.Writer)
- type ColorMode
- type Config
- type Entry
- type ExecutionContext
- type Format
- type Level
- type Logger
- func (l *Logger) Component() string
- func (l *Logger) Ctx(ctx context.Context) *Entry
- func (l *Logger) Debug(msg string, args ...any)
- func (l *Logger) Enabled(level Level) bool
- func (l *Logger) Error(msg string, args ...any)
- func (l *Logger) Info(msg string, args ...any)
- func (l *Logger) Warn(msg string, args ...any)
- type Mode
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(cfg Config)
func RequestIDFromContext ¶
func ValidateCore ¶
func WithExecutionContext ¶
func WithExecutionContext(ctx context.Context, value ExecutionContext) context.Context
func WriteBanner ¶
Types ¶
type Config ¶
type Config struct {
Level Level
Mode Mode
Format Format
Color ColorMode
TimestampEnabled bool
TimestampFormat string
ComponentWidth int
RequestIDWidth int
DefaultComponent string
Output io.Writer
// contains filtered or unexported fields
}
func ConfigFromCore ¶
func DefaultConfig ¶
func DefaultConfig() Config
func DevelopmentConfig ¶
func DevelopmentConfig() Config
func ProductionConfig ¶
func ProductionConfig() Config
type ExecutionContext ¶
type ExecutionContext string
func ExecutionContextFromContext ¶
func ExecutionContextFromContext(ctx context.Context) ExecutionContext
Click to show internal directories.
Click to hide internal directories.