This commit is contained in:
gabime 2014-11-23 01:12:35 +02:00
parent dc198a5e64
commit 9e4b6f9cc3
2 changed files with 10 additions and 10 deletions

View File

@ -16,9 +16,9 @@ int main(int argc, char* argv[])
int howmany = 1000000; int howmany = 1000000;
FLAGS_logtostderr = 0; FLAGS_logtostderr = 0;
FLAGS_log_dir = "logs"; FLAGS_log_dir = "logs";
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
std::atomic<int > msg_counter {0}; std::atomic<int > msg_counter {0};
vector<thread> threads; vector<thread> threads;
@ -31,7 +31,7 @@ int main(int argc, char* argv[])
{ {
int counter = ++msg_counter; int counter = ++msg_counter;
if (counter > howmany) break; if (counter > howmany) break;
LOG(INFO) << "glog message # " << counter; LOG(INFO) << "glog message # " << counter;
} }
})); }));
} }

View File

@ -7,11 +7,11 @@ int main(int, char* argv[])
int howmany = 1000000; int howmany = 1000000;
FLAGS_logtostderr = 0; FLAGS_logtostderr = 0;
FLAGS_log_dir = "logs"; FLAGS_log_dir = "logs";
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
for(int i = 0 ; i < howmany; ++i) for(int i = 0 ; i < howmany; ++i)
LOG(INFO) << "glog message # " << i; LOG(INFO) << "glog message # " << i;
return 0; return 0;
} }