more granular timestamps in logs#129
Merged
tzaffi merged 3 commits intoalgorand:masterfrom Aug 1, 2023
Merged
Conversation
tzaffi
commented
Jul 31, 2023
Codecov Report
@@ Coverage Diff @@
## master #129 +/- ##
==========================================
+ Coverage 67.66% 70.47% +2.81%
==========================================
Files 32 36 +4
Lines 1976 2544 +568
==========================================
+ Hits 1337 1793 +456
- Misses 570 654 +84
- Partials 69 97 +28
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
tzaffi
commented
Jul 31, 2023
| assert.Equal(t, str, "{\"__type\":\"A Question\",\"_name\":\"What's in a name?\",\"level\":\"info\",\"msg\":\"That which we call a rose by any other name would smell just as sweet.\",\"time\":\"0001-01-01T00:00:00Z\"}\n") | ||
|
|
||
| assert.Equal(t, | ||
| "{\"__type\":\"A Question\",\"_name\":\"What's in a name?\",\"level\":\"info\",\"msg\":\"That which we call a rose by any other name would smell just as sweet.\",\"time\":\"0001-01-01T00:00:00Z\"}\n", |
Contributor
Author
There was a problem hiding this comment.
Interestingly, I'm NOT actually changing this test in any meaningful way. The unit test already assumed this format and the zero-value of the timestamp doesn't print out the sub-second info.
Contributor
Author
There was a problem hiding this comment.
tzaffi
commented
Jul 31, 2023
conduit/data/config.go
Outdated
Comment on lines
+20
to
+21
| // Unfortunately, variations on this theme didn't work: | ||
| // ConduitTimeFormat = "Mon, 02 Jan 2006 15:04:05.123456789 -0700" |
Contributor
Author
There was a problem hiding this comment.
^^^ just adding more decimal places didn't work ^^^
tzaffi
commented
Jul 31, 2023
tzaffi
commented
Jul 31, 2023
shiqizng
approved these changes
Jul 31, 2023
winder
approved these changes
Aug 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Change Conduit's formatter for a higher level of granularity to:
Caveat
Taken from: https://pkg.go.dev/time
Test Plan
CI