5

I'm using Google glog for logging. I have a file in a directory with path dir/file.cc.

I want to enable verbose logging level 5 just in this file. So I export GLOG_vmodule="file=5" into the environment and then run the program. But glog still doesn't log the VLOG(5) messages in this file. Is there a problem with the way I'm setting vmodule? Can anyone give me an example of how this should be done?

1 Answer 1

1

As specified here in the glog documentation:

Verbose logging can be controlled from the command line on a per-module basis:

--vmodule=mapreduce=2,file=1,gfs*=3 --v=0 will:

a. Print VLOG(2) and lower messages from mapreduce.{h,cc}

b. Print VLOG(1) and lower messages from file.{h,cc}

c. Print VLOG(3) and lower messages from files prefixed with "gfs"

d. Print VLOG(0) and lower messages from elsewhere

1
  • 2
    Note that this only works with gcc compilers as noted in the glog source file vlog_is_on.h Jul 11, 2022 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.