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

SetLogger should delete previously set custom logger. #853

Merged
merged 2 commits into from
Aug 13, 2022

Conversation

anpol
Copy link
Contributor

@anpol anpol commented Aug 13, 2022

As specified in the doc comment for SetLogger, "the logger becomes the property of the logging module and should not be deleted by the caller".

Not only should the LogDestination delete a custom logger in its destructor, but it should also delete a previous logger when another logger is passed to SetLogger().

As specified in the doc comment for SetLogger, "the logger becomes the
property of the logging module and should not be deleted by the caller".

Not only should the LogDestination delete a custom logger in its
destructor, but it should also delete a previous logger when another
logger is passed to SetLogger().
Copy link
Collaborator

@sergiud sergiud left a comment

Choose a reason for hiding this comment

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

Thank you! I have only a minor remark.

src/logging.cc Outdated Show resolved Hide resolved
Co-authored-by: Sergiu Deitsch <sergiud@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2022

Codecov Report

Merging #853 (c0fc870) into master (278ed96) will increase coverage by 0.08%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master     #853      +/-   ##
==========================================
+ Coverage   73.17%   73.26%   +0.08%     
==========================================
  Files          17       17              
  Lines        3277     3288      +11     
==========================================
+ Hits         2398     2409      +11     
  Misses        879      879              
Impacted Files Coverage Δ
src/logging.cc 74.87% <90.00%> (+0.20%) ⬆️
src/glog/logging.h.in 79.45% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@anpol anpol requested a review from sergiud August 13, 2022 09:46
@sergiud sergiud merged commit 6d5b384 into google:master Aug 13, 2022
@sergiud sergiud added the bug label Aug 13, 2022
@sergiud sergiud added this to the 0.7 milestone Aug 13, 2022
@anpol anpol deleted the set-logger-delete branch August 13, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants