Skip to content

Properly handle slog.Attr in KHILogFormatHandler #705

@kyasbal

Description

@kyasbal

Current KHI's slog handler just displays the main message only and ignores all the attributes given.
This makes our logging logics to format explicitly with fmt.Sprintf.

We should support slog.Attr to enable the following logging syntax.

slog.WarnContext(ctx, fmt.Sprintf("hello number=%d", 10)) // Current
slog.WarnContext(ctx, "hello", "number", 10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions