allenhoum / google-glog

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

NDEBUG mutes all logs #162

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi guys,

I may have found a bug:

What steps will reproduce the problem?
$> # compile and installl truck version of glog in /tmp/test3/test33
/tmp/test3/test33 $> cat test.cpp
#include <glog/logging.h>

int main(int, char** av)
{
    google::InitGoogleLogging(av[0]);
    DLOG(ERROR) << "Hello";
    return 0;
}

/tmp/test3/test33 $>g++ -DNDEBUG test.cpp -Iinclude -Llib lib/libglog.so  
/tmp/test3/test33 $>LD_LIBRARY_PATH=lib ./a.out                          
/tmp/test3/test33 $>g++ test.cpp -Iinclude -Llib lib/libglog.so          
/tmp/test3/test33 $>LD_LIBRARY_PATH=lib ./a.out                 
E0607 16:25:39.059041 10387 test.cpp:7] Hello
/tmp/test3/test33 $>

What is the expected output? What do you see instead?
I expect to be able to log even with the NDEBUG macro.

What version of the product are you using? On what operating system?
The issue has been produced on:
Ubuntu 12.10 (GNU/Linux 3.5.0-32-generic x86_64)
g++4.7
clang3.3
libstdc++6-4.7-dev

glog 3.2 and the trunk version.

Original issue reported on code.google.com by thomas.s...@gmail.com on 7 Jun 2013 at 2:34

Attachments:

GoogleCodeExporter commented 8 years ago
Nevermind. I should not post the friday :)

Original comment by thomas.s...@gmail.com on 7 Jun 2013 at 2:39