wook815 / google-glog

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

GLOG_stderrthreshold seems to have no effect #76

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define environment variable "GLOG_stderrthreshold" to "0" (INIT)
2. Log s.th. with INFO and ERROR level:
   LOG(INFO) << "TEST INFO" << endl;
   LOG(ERROR) << "TEST ERROR" << endl;
3. The ERROR log appears in the stderr (console), the INGO log not.

What is the expected output? What do you see instead?
Because stderrthreshold==0, I expect that the INFO log appears on stderr, too. 
If I change GLOG_stderrthreshold to 3 (FATAL), the ERROR log still appears, 
why? So, I guess the GLOG_stderrthreshold environment variable has no effect at 
all. But the name is correct, isn't it?

E.g. the GLOG_logtostderr has the expected result. If set to 1, all logs appear 
in the console, but no more in a file.

What version of the product are you using? On what operating system?
glog-0.3.1
Windows XP

Please provide any additional information below.
By setting "google::SetStderrLogging(google::INFO);" in code, the result is as 
expected.

Original issue reported on code.google.com by klausbec...@gmail.com on 8 Dec 2010 at 9:10

GoogleCodeExporter commented 8 years ago
Need to set variable GLOG_alsologtostderr=1.

Original comment by pa...@posten.ru on 1 Dec 2012 at 6:04