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

NopLogger: Fix nil Clock panic and release #974

Merged
merged 2 commits into from Jun 28, 2021
Merged

NopLogger: Fix nil Clock panic and release #974

merged 2 commits into from Jun 28, 2021

Commits on Jun 28, 2021

  1. NopLogger: Fix nil Clock panic

    In #897, we added a `zap.Clock` option to control the source of time
    but neglected to set this field on the logger constructed by
    `zap.NewNop`. This has the effect of panicking the Nop logger with a nil
    dereference.
    
    Fix the nil dereference and add checks for the behavior of the Nop
    logger.
    
    Verified that these are the only instantiations of `Logger` in this
    package:
    
    ```
    $ rg '\bLogger\{' *.go
    logger_test.go
    67:                     for _, logger := range []*Logger{grandparent, parent, child} {
    
    logger.go
    71:     log := &Logger{
    86:     return &Logger{
    ```
    
    Refs GO-684
    abhinav committed Jun 28, 2021
    Copy the full SHA
    7ea57ce View commit details
    Browse the repository at this point in the history
  2. Prepare release v1.18.1

    This tags a patch release of the breakage introduced in 1.18.0.
    abhinav committed Jun 28, 2021
    Copy the full SHA
    a779980 View commit details
    Browse the repository at this point in the history