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

Add RFC3339NanoFormatter and UnixNanoFormatter #276

Merged
merged 1 commit into from
Feb 7, 2017

Conversation

errnoh
Copy link
Contributor

@errnoh errnoh commented Feb 5, 2017

Adds support for two different methods of logging in nanosecond precision without losing information.

Both are new TimeFormatters, so that no existing code will break. RFC3339NanoFormatter is similar to RFC3339Formatter but uses time.RFC3339Nano instead of time.RFC3339, and UnixNanoFormatter uses time.Time.UnixNano() int64 output that is fast to both serialize and read back in time.Time format.

See #275 for the issue in question.

@mention-bot
Copy link

@errnoh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @akshayjshah to be a potential reviewer.

@CLAassistant
Copy link

CLAassistant commented Feb 5, 2017

CLA assistant check
All committers have signed the CLA.

@akshayjshah
Copy link
Contributor

LGTM. Thanks for the contribution, @errnoh! Keep in mind that we're getting close to releasing a stable 1.0 of zap, and many of these APIs will change. I'll make sure to keep a handful of nanosecond-precision options available with the new APIs, too.

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.

4 participants