zhangjl / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

Different log components #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Is there a way to specify a name of the program component responsible for 
the log message? Something like 

  LOG(INFO, "componentA") << "Everything is great";

If this feature doesn't exist, it would be great to have.  Then, if I could 
select at run-time which components' messages I want to see (among those 
that pass the compile-time GOOGLE_STRIP_LOG parameter), I could spare myself 
from a lot of unnecessary output.

Original issue reported on code.google.com by fox...@gmail.com on 22 Nov 2009 at 3:41

GoogleCodeExporter commented 9 years ago
Isn't this http://google-glog.googlecode.com/svn/trunk/doc/glog.html#verbose
what you are looking for? I mean why don't you specify it via --vmodule. If you 
put
each component in its own file, then this should be fine.

Original comment by jens.k.mueller@gmail.com on 23 Nov 2009 at 6:48

GoogleCodeExporter commented 9 years ago
Ah, vmodule looks close to what I want. I overlooked it probably since it seems 
to get 
very little attention in the documentation. It would be nice if the naming was 
more 
flexible than just the filenames, and even better if I could have different 
modules 
within the same filename, but this is already far better than nothing.

Thanks for the pointer.

Original comment by fox...@gmail.com on 23 Nov 2009 at 7:40