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

internal/log: Improve API for testing #916

Merged
merged 4 commits into from
May 4, 2021

Commits on May 3, 2021

  1. internal/log: Improve API for testing

    I just noticed that d9472a0 caused the profiler package to always emit
    some log output, regardless of `go test -v` being used or not. I'm very
    sorry about this. IMO tests should never print to stdout unless
    requested.
    
    This patch is my attempt to fix this by making it easy for individual
    tests to capture the log output (see UseLogger, RecordLogger). I've also
    added DiscardLogger since it can be very convenient for tests that want
    to ignore log output without capturing it. Arguably RecordLogger could
    be used for this as well, but that would do a poor job of capturing the
    intend of such code.
    felixge committed May 3, 2021
    Configuration menu
    Copy the full SHA
    fd28bf2 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. Configuration menu
    Copy the full SHA
    8c61d7d View commit details
    Browse the repository at this point in the history
  2. Move import line

    felixge committed May 4, 2021
    Configuration menu
    Copy the full SHA
    bc28e2a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bce3c86 View commit details
    Browse the repository at this point in the history