Documentation
¶
Index ¶
- func Debug(msg string, fields Fields)
- func Debugf(format string, args ...interface{})
- func DebugfContext(ctx context.Context, format string, args ...interface{})
- func Error(msg string, fields Fields)
- func Errorf(format string, args ...interface{})
- func ErrorfContext(ctx context.Context, format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func GetCorrelationID(ctx context.Context) string
- func GetLogger() *slog.Logger
- func GetTraceID(ctx context.Context) string
- func Info(msg string, fields Fields)
- func Infof(format string, args ...interface{})
- func InfofContext(ctx context.Context, format string, args ...interface{})
- func SetLogLevel(level slog.Level)
- func Warn(msg string, fields Fields)
- func Warnf(format string, args ...interface{})
- func WarnfContext(ctx context.Context, format string, args ...interface{})
- func WithCorrelationID(ctx context.Context, correlationID string) context.Context
- func WithTraceID(ctx context.Context, traceID string) context.Context
- type Fields
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a message at level Debug on the standard logger.
func DebugfContext ¶ added in v0.1.11
DebugfContext logs a message at level Debug with the given context (trace_id/correlation_id from ctx are included in JSON).
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs a message at level Error on the standard logger.
func ErrorfContext ¶ added in v0.1.11
ErrorfContext logs a message at level Error with the given context (trace_id/correlation_id from ctx are included in JSON).
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a message at level Fatal on the standard logger and exits.
func GetCorrelationID ¶ added in v0.1.11
GetCorrelationID returns the correlation ID from ctx if set, otherwise empty string.
func GetTraceID ¶ added in v0.1.11
GetTraceID returns the trace ID from ctx if set, otherwise empty string.
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a message at level Info on the standard logger.
func InfofContext ¶ added in v0.1.11
InfofContext logs a message at level Info with the given context (trace_id/correlation_id from ctx are included in JSON).
func Warnf ¶
func Warnf(format string, args ...interface{})
Warnf logs a message at level Warn on the standard logger.
func WarnfContext ¶ added in v0.1.11
WarnfContext logs a message at level Warn with the given context (trace_id/correlation_id from ctx are included in JSON).
func WithCorrelationID ¶ added in v0.1.11
WithCorrelationID returns a copy of ctx with the given correlation ID.