Documentation
¶
Index ¶
- func AnyValueToString(v slog.Value) string
- func AppendAttrsToGroup(groups []string, actualAttrs []slog.Attr, newAttrs ...slog.Attr) []slog.Attr
- func AppendRecordAttrsToAttrs(attrs []slog.Attr, groups []string, record *slog.Record) []slog.Attr
- func AttrToValue(attr slog.Attr) (string, any)
- func AttrsToMap(attrs ...slog.Attr) map[string]any
- func AttrsToString(attrs ...slog.Attr) map[string]string
- func ContextExtractor(ctx context.Context, fns []func(ctx context.Context) []slog.Attr) []slog.Attr
- func ExtractError(attrs []slog.Attr, errorKeys ...string) ([]slog.Attr, error)
- func ExtractFromContext(keys ...any) func(ctx context.Context) []slog.Attr
- func FindAttrByGroupAndKey(attrs []slog.Attr, groups []string, key string) (slog.Attr, bool)
- func FindAttrByKey(attrs []slog.Attr, key string) (slog.Attr, bool)
- func FindAttribute(attrs []slog.Attr, groups []string, key string) (slog.Attr, bool)
- func FormatError(err error) any
- func FormatErrorKey(values map[string]any, errorKeys ...string) map[string]any
- func FormatRequest(req *http.Request, ignoreHeaders bool) map[string]any
- func RecordToAttrsMap(r slog.Record) map[string]any
- func RemoveEmptyAttrs(attrs []slog.Attr) []slog.Attr
- func ReplaceAttrs(fn ReplaceAttrFn, groups []string, attrs ...slog.Attr) []slog.Attr
- func ReplaceError(attrs []slog.Attr, errorKeys ...string) []slog.Attr
- func Source(sourceKey string, r *slog.Record) slog.Attr
- func StringSource(sourceKey string, r *slog.Record) slog.Attr
- func UniqAttrs(attrs []slog.Attr) []slog.Attr
- func ValueToString(v slog.Value) string
- type ReplaceAttrFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyValueToString ¶
func AppendAttrsToGroup ¶
func AppendRecordAttrsToAttrs ¶ added in v0.10.0
func ContextExtractor ¶ added in v0.16.0
func ExtractError ¶ added in v0.15.0
func ExtractFromContext ¶ added in v0.16.0
func FindAttrByGroupAndKey ¶
func FindAttribute ¶ added in v0.13.0
func FormatError ¶
func FormatErrorKey ¶
func FormatRequest ¶ added in v0.5.0
func ReplaceAttrs ¶ added in v0.7.0
func ReplaceError ¶ added in v0.11.0
func ValueToString ¶ added in v0.2.0
Types ¶
Click to show internal directories.
Click to hide internal directories.
