Skip to content

Support for configurable headers... #6

@ansel1

Description

@ansel1

This project is handler middleware which extracts a configurable number of attrs from the record, and prints them as header fields before the message: https://github.com/dpotapov/slogpfx

I thought that was a clever idea, but would be more efficient to implement natively. I have a branch of console-slog which supports this type of function natively. In the following example, I configured the "logger" attr to be removed from the attr list, and inserted before the message as a header. (the value of "logger" is "console-slog" in this example...)

What do you think of this? Would this be a PR you would consider?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions