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

Migrate from GLOG to Folly logging #409

Open
pshinghal opened this issue Apr 28, 2022 · 1 comment
Open

Migrate from GLOG to Folly logging #409

pshinghal opened this issue Apr 28, 2022 · 1 comment

Comments

@pshinghal
Copy link

We’re migrating Proxygen from using GLOG to Folly logging which is more flexible, natively supports async logging and has a number of other advantages.

General configuration instructions are here.

Notably, this means anything running Proxygen lib will need to use a different logging config, replacing -v and --vmodule with a matching config passed to --logging.

For example, if you wanted to print all logs up to V2, except in myprojectroot/proxygen/lib/transport/H3DatagramAsyncSocket.cpp and myprojectroot/proxygen/lib/transport/PersistentFizzPskCache.cpp, where you wanted to silence all the verbose logs entirely, then you might have run your binary with something like this:

-v=2 --vmodule=H3DatagramAsyncSocket*=0,PersistentFizzPskCache*=0

But now you would run it with:

--logging=DBG2,myprojectroot.proxygen.lib.transport.H3DatagramAsyncSocket:=INFO,myprojectroot.proxygen.lib.transport.PersistentFizzPskCache:=INFO

As another example, to exclude all verbose logging across the entire codebase and to exclude all logging (not just verbose) only from the files under proxygen/lib/transport/, you might run it with:

--logging=INFO,myprojectroot.proxygen.lib.transport:=MAX_LEVEL

If you use custom log sinks with GLOG, you will need to migrate them to Folly Log Handlers and if you use the GOOGLE_STRIP_LOG macro, you will need to use the corresponding value for FOLLY_XLOG_MIN_LEVEL.

@afrind
Copy link
Contributor

afrind commented Sep 4, 2024

We would like to do this, but we're blocked internally unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants