-
Notifications
You must be signed in to change notification settings - Fork 399
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
fix: disable nanosecond timestamp when only EnableTimestampNanosecond is enabled #1528
Conversation
This file contains 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
henryzhx8
requested review from
messixukejia,
Abingcbc,
linrunqi08 and
yyuuttaaoo
June 7, 2024 05:51
yyuuttaaoo
reviewed
Jun 7, 2024
messixukejia
reviewed
Jun 7, 2024
yyuuttaaoo
approved these changes
Jun 7, 2024
messixukejia
approved these changes
Jun 7, 2024
Abingcbc
reviewed
Jun 7, 2024
@@ -138,7 +138,9 @@ Json::Value LogEvent::ToJson(bool enableEventMeta) const { | |||
Json::Value root; | |||
root["type"] = static_cast<int>(GetType()); | |||
root["timestamp"] = GetTimestamp(); | |||
root["timestampNanosecond"] = GetTimestampNanosecond(); | |||
if (GetTimestampNanosecond()) { | |||
root["timestampNanosecond"] = static_cast<int32_t>(GetTimestampNanosecond().value()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的类型是不是也可以统一成uint32_t?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json不认识uint,只认识int,不这样搞的话,在单测那里,会出现uint != int的情况,只能强制转成int
linrunqi08
pushed a commit
that referenced
this pull request
Jun 18, 2024
… is enabled (#1528) * fix: disable nanosecond timestamp when only EnableTimestampNanosecond is enabled
henryzhx8
added a commit
that referenced
this pull request
Jun 19, 2024
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.
注:本PR只解决C++部分的问题,Golang部分待 @Abingcbc 确认。