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

include default meta in addMeta overwrite method #303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shimms
Copy link

@shimms shimms commented Sep 16, 2024

The current implementation of overwrite.addMeta does not make it easy to get the runtime's default meta if you're just looking to extend it with additional pieces of meta information (such as a request ID).

This PR allows the default meta to be passed into the overwrite method so that you can return it again, preserving existing behaviour whilst giving you an entry point to extend the meta, rather than replace it.

This has been done in a non-breaking way, existing implementations will work without any changes, whilst the API allows you to provide an optional new argument to populate the default meta. Existing uses of tslog will be unaffected by this change.

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

Successfully merging this pull request may close these issues.

1 participant