-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Added gmtoff() method in 'LogMessageTime' to get GMT offset #727
Conversation
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.
Thanks for the PR. Unfortunately, there are some build errors.
Hi @sergiud , I've added a unit test for my newly added code in the existing file "logging_custom_prefix_unittest.cc". But still "Coverage" check is failing. Thanks |
Thanks! Could you please rebase? |
Hi @sergiud , Rebased the branch. Please have a look. |
src/glog/logging.h.in
Outdated
const int& dayOfWeek() const { return time_struct.tm_wday; } | ||
const int& dayInYear() const { return time_struct.tm_yday; } | ||
const int& dst() const { return time_struct.tm_isdst; } | ||
LogMessageTime() { |
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.
You can initialize all these members in constructor's initializer list.
Codecov Report
@@ Coverage Diff @@
## master #727 +/- ##
==========================================
+ Coverage 72.65% 72.76% +0.11%
==========================================
Files 17 17
Lines 3211 3224 +13
==========================================
+ Hits 2333 2346 +13
Misses 878 878
Continue to review full report at Codecov.
|
Hi @sergiud , Looks like there is some issue with "VS-15-2017-x64-C++11-Release-shared-no-custom-prefix".
Is it possible to rerun this job? Thanks, |
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.
This looks almost ready to me. I have only minor remarks.
You should also probably add your name to AUTHORS
and CONTRIBUTORS
files as per contribution guide and eventually squash and rebase onto current master (if not done yet).
* Added API to get GMT offset * Made LogMessageTime as a memeber of LogMessage * Refactored LogSink::send() method
Thanks! |
Hi @sergiud , This was my first open source contribution. |
You're welcome. You did a great job! |
closes #707
As per enhancement request attached above, added gmtoff() method in 'LogMessageTime' to get GMT offset.
Rearranged the code to access the variable "FLAGS_log_utc_time" in this file