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

Add SkipFields option #8

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

Conversation

gillepsi
Copy link

Adds a SkipFields option which omits the given fields from standard output. This is useful if you have a CloudWatch hook and want certain fields to be included in the CloudWatch logs, but not in the standard output.

For my circumstance, I omitted correlation ID equivalent fields, which are useful in logs, but is excessive detail in the standard output.

@coveralls
Copy link

coveralls commented Mar 15, 2021

Pull Request Test Coverage Report for Build 50

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 48: 0.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

@dfateyev
Copy link
Contributor

By the way, I have recently stumbled upon a similar issue. But, I found the approach of deleting message fields at the message formatting stage incorrect by design for a generic message formatter.
A specialized formatter in Hook with a limited and tailored functionality will do things faster and cleaner than the generic one with many options to consider.

Also, sometimes it's possible to use a more suitable logging context, without fields to skip.

@antonfisher IMO, we can close this PR without merging.

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.

3 participants