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

WrapError: wrap an error with fields to be logged by zap.Error #1271

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Commits on Apr 12, 2023

  1. WrapError: wrap an error with fields to be logged by zap.Error

    Related to uber-go/guide#179
    
    Callsites that receive an error should either log, or return an error.
    
    However, if the callsite has additioanl context, the simplest option is
    to add it to the error, but it's then flattened into a string, losing
    the benefit of structured logging. This often results in callsites
    logging with additional fields, and returning an error that is likely
    to be logged again.
    
    `WrapError` provides a way for callsites to return an error that
    includes fields to be logged, which will be added to an `errorFields`
    key.
    prashantv committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    a99527f View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2023

  1. Support nesting of errors

    prashantv committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    2a88ec3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b71daf6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    36183ab View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1122080 View commit details
    Browse the repository at this point in the history
  5. More tests

    prashantv committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    568f031 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    26b53cc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c9125d3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2f96d3a View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Configuration menu
    Copy the full SHA
    baf6027 View commit details
    Browse the repository at this point in the history