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

How to make module specific VERBOSE logging dynamic #494

Closed
anirbanr-fb opened this issue Nov 7, 2019 · 1 comment
Closed

How to make module specific VERBOSE logging dynamic #494

anirbanr-fb opened this issue Nov 7, 2019 · 1 comment

Comments

@anirbanr-fb
Copy link

anirbanr-fb commented Nov 7, 2019

Today at every VLOG_IS_ON site, we cache a vlocal pointer, which points to FLAGS_v if
vmodule was never used on that binary. If that site's logging has been hit one time, I think
it will point to &FLAGS_v and no more to &google::kLogSiteUninitialized.

This will prevent this site to recache a new value of vlocal which could now have been set
using SetVLOGLevel(). How can we achieve module specific dynamic logging in such a case?

I would like a server to be running with verbose logging FLAGS_v = 0 initially. Then instead of
turning on FLAGS_v globally I would like to be selectively turned on for a few files.

This problem also seems to be captured in the comments on the header file.

// NOTE: To change the log level for VLOG(_IS_ON) sites
// that have already executed after/during InitGoogleLogging,
// one needs to supply the exact --vmodule pattern that applied to them.
// (If no --vmodule pattern applied to them
// the value of FLAGS_v will continue to control them.)

which tells that the dynamic nature of these flags can never be an afterthought.

@sergiud
Copy link
Collaborator

sergiud commented Jan 5, 2024

This issue should have been fixed by #650.

@sergiud sergiud closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants