Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for configurable headers... #6

Open
ansel1 opened this issue Jan 7, 2025 · 0 comments
Open

Support for configurable headers... #6

ansel1 opened this issue Jan 7, 2025 · 0 comments

Comments

@ansel1
Copy link

ansel1 commented Jan 7, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant