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

zapcore: Ignore nil Entry.Time in encoders #1369

Merged
merged 3 commits into from
Oct 5, 2023
Merged

zapcore: Ignore nil Entry.Time in encoders #1369

merged 3 commits into from
Oct 5, 2023

Commits on Oct 4, 2023

  1. zapcore: Ignore nil Entry.Time in encoders

    Per the comment on `Encoder.EncodeEntry`, any fields that are empty
    including fields on the `Entry` type should be omitted.
    Omit the `Time` field when we have empty time.
    This also aligns with slog.Handler contract.
    
    Refs #1334
    Discovered by #1335
    justinhwang committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    e15b7f3 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. zapslog: Delete skipped test

    This work is being tracked in #1334.
    abhinav committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    8af313a View commit details
    Browse the repository at this point in the history
  2. test: Verify console encoder behavior

    Verifies that the console encoder also skips the time
    if it's a zero value.
    abhinav committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    f9de9df View commit details
    Browse the repository at this point in the history