fcoulombe / google-glog

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

Miscellaneous FLAGS_ definitions missing (when not using gflags) #160

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a program that doesn't use gflags.
2. Attempt to set the FLAGS_vmodule filter pro-grammatically.
3. Attempt to compile said program (FLAGS_vmodule) is not defined.

What is the expected output? What do you see instead?
I should be able to set FLAGS_vmodule without issue.  Same with some other FLAG 
variables (alsologtoemail, logmailer, log_backtrace_at).

What version of the product are you using? On what operating system?
Version 0.3.3 on MacOS and on Redhat Enterprise Linux

Please provide any additional information below.
After some poking around, I discovered the the include file logging.h doesn't 
DECLARE all of the variables defined as valid FLAGS.  I added the following to 
the logging.h include file and achieved my desired results.

DECLARE_string(vmodule); // in vlog_is_on.cc
DECLARE_string(alsologtoemail);
DECLARE_string(logmailer);
DECLARE_string(log_backtrace_at);

Original issue reported on code.google.com by emcvicke...@gmail.com on 17 May 2013 at 3:28

Attachments:

GoogleCodeExporter commented 9 years ago
Compiled with:
g++ logTest.cc Resources.cc -O0 -ggdb -o logTest -L/Users/emcvicker/macos/lib 
-I/Users/emcvicker/macos/include -lglog

Output following modification to the logging.h include file:

./logTest                                                                       
       I0516 20:17:33.316233 1979005280 logTest.cc:26] This is a test INFO LOG
W0516 20:17:33.316884 1979005280 logTest.cc:27] This is a test WARNING LOG
E0516 20:17:33.331024 1979005280 logTest.cc:28] This is a test ERROR LOG
I0516 20:17:33.331140 1979005280 logTest.cc:29] This is a test VLOG(1)
I0516 20:17:33.331166 1979005280 logTest.cc:30] This is a test VLOG(2)
I0516 20:17:33.331176 1979005280 logTest.cc:31] This is a test VLOG(3)
I0516 20:17:33.331186 1979005280 logTest.cc:32] This is a test VLOG(4)
I0516 20:17:33.331226 1979005280 logTest.cc:33] This is a test VLOG(5)
I0516 20:17:33.331264 1979005280 logTest.cc:34] This is a test VLOG(6)
I0516 20:17:33.331275 1979005280 logTest.cc:35] This is a test VLOG(7)
I0516 20:17:33.331284 1979005280 logTest.cc:36] This is a test VLOG(8)
I0516 20:17:33.331292 1979005280 logTest.cc:37] This is a test VLOG(9)
I0516 20:17:33.331338 1979005280 Resources.cc:6] This is VLOG(1)
I0516 20:17:33.331369 1979005280 Resources.cc:7] This is VLOG(2)
I0516 20:17:33.331380 1979005280 Resources.cc:8] This is VLOG(3)
I0516 20:17:33.331389 1979005280 Resources.cc:9] This is VLOG(4)

Original comment by emcvicke...@gmail.com on 17 May 2013 at 3:31