Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

logging: Use nanosecond timestamps #136

Merged

Conversation

jodh-intel
Copy link
Contributor

Switch from second-resolution timestamps to nanosecond-resolution for
greater precision and consistency with the runtime and agent.

Fixes #135.

Signed-off-by: James O. D. Hunt james.o.hunt@intel.com

@clearcontainersbot
Copy link

kubernetes qa-passed 👍

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm


// enable nanosecond timestamps
proxyLog.Logger.Formatter = &logrus.TextFormatter{
TimestampFormat: time.RFC3339Nano,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just whilst I'm here, not sure if directly related - I noticed our logs were putting in timezone info like BST+1 etc. - would it be possible for us to move all the time logging to UTC, and hence drop the extra noise?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's happening for the runtime so we can look at that separately...

This change modifies the proxy timestamps from:

2017-09-28T08:52:45+01:00

to:

2017-09-29T08:52:45.176464812+01:00

The TZ is in there, but encoded numerically as an offset.

@jodh-intel
Copy link
Contributor Author

Another occurrence of Jenkins not updating the github status it seems as the 16.04 was successful. Force-push-updating...

@grahamwhaley
Copy link
Contributor

I thought I'd have a peek - I see the force push has kicked off another jenkins, but the previous jenkins build I think is saying 'aborted' on the top level status. Build #4 on the lhs list here:
http://cc-jenkins-ci.westus2.cloudapp.azure.com/job/clear-containers-proxy-azure-ubuntu-16-04-PR/

Hmm, yeah, the end of the log says:

POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
Setting status of 232d3bdd44b4f3f6923c6dd7468c2e595e30ee64 to FAILURE with url http://cc-jenkins-ci.westus2.cloudapp.azure.com/job/clear-containers-proxy-azure-ubuntu-16-04-PR/4/ and message: 'Build finished. '
Using context: jenkins-ci-ubuntu-16-04
Finished: ABORTED

So, I'm not sure it was successful, but I can't find why in the logs

@jodh-intel
Copy link
Contributor Author

Ugh - I didn't see that error because the Jenkins console doesn't show it! You seemingly have to view the raw log to see the last line! ;-(

@jodh-intel
Copy link
Contributor Author

Reported as clearcontainers/jenkins#12.

@clearcontainersbot
Copy link

kubernetes qa-failed 👎

@clearcontainersbot
Copy link

kubernetes qa-failed 👎

@jodh-intel
Copy link
Contributor Author

Sigh - the 16.04 CI job is invalid (404 error). Re-pushing...

@clearcontainersbot
Copy link

kubernetes qa-passed 👍

Switch from second-resolution timestamps to nanosecond-resolution for
greater precision and consistency with the runtime and agent.

Fixes clearcontainers#135.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@clearcontainersbot
Copy link

kubernetes qa-passed 👍

@jodh-intel jodh-intel merged commit 1ebf8d5 into clearcontainers:master Oct 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants