We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf3284c commit ec90c74Copy full SHA for ec90c74
glog/log_vlog.cpp
@@ -0,0 +1,22 @@
1
+#include <glog/logging.h>
2
+
3
+//g++ glog.cpp -lglog
4
+//GLOG_v=7 GLOG_logtostderr=1 ./a.out
5
6
+//https://stackoverflow.com/questions/40394102/vlog-doesnt-work-for-google-logging-library-glog
7
8
+int main(int argc, char* argv[]) {
9
+ // Initialize Google's logging library.
10
+ google::InitGoogleLogging(argv[0]);
11
+ int i = 3;
12
13
+ LOG(INFO) << "Found " << 3 << " cookies";
14
+ LOG(ERROR) << "Found " << 3 << " cookies";
15
+ VLOG(5) << "vlog" << 4 << "abc" << 4.3 << i;
16
+}
17
18
+/*
19
+I0109 14:14:01.028268 30790 glog.cpp:11] Found 3 cookies
20
+E0109 14:14:01.028389 30790 glog.cpp:12] Found 3 cookies
21
+I0109 14:14:01.028403 30790 glog.cpp:13] vlog4abc4.33
22
+*/
0 commit comments