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

skip timestamp if EncodeTime is nil (#645) #646

Closed
wants to merge 1 commit into from
Closed

skip timestamp if EncodeTime is nil (#645) #646

wants to merge 1 commit into from

Conversation

errpunk
Copy link

@errpunk errpunk commented Oct 20, 2018

This PR fix the issue #645
Program will panic when user set the TimeKey and did not set EncodeTime explicitly.
I've noticed that in consoleEncoder it will skip timestamp if EncodeTime is nil, so I add this into jsonEncoder to ensure behavioral consistency.

@codecov
Copy link

codecov bot commented Oct 20, 2018

Codecov Report

Merging #646 into master will decrease coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #646     +/-   ##
=========================================
- Coverage   97.38%   97.28%   -0.1%     
=========================================
  Files          40       40             
  Lines        2102     2102             
=========================================
- Hits         2047     2045      -2     
- Misses         47       48      +1     
- Partials        8        9      +1
Impacted Files Coverage Δ
zapcore/json_encoder.go 100% <100%> (ø) ⬆️
zapcore/sampler.go 95.83% <0%> (-4.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67bc79d...f749607. Read the comment docs.

@abhinav
Copy link
Collaborator

abhinav commented Mar 13, 2020

Superseded by #791

@abhinav abhinav closed this Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants