20 lines
471 B
C++
20 lines
471 B
C++
#include <gflags/gflags.h>
|
|
#include <glog/logging.h>
|
|
#include <glog/stl_logging.h>
|
|
|
|
int main(int argc, char* argv[]) {
|
|
// Initialize Google's logging library.
|
|
google::InitGoogleLogging(argv[0]);
|
|
|
|
// Optional: parse command line flags
|
|
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
|
|
|
LOG(INFO) << "Hello, world!";
|
|
|
|
// glog/stl_logging.h allows logging STL containers.
|
|
std::vector<int> x {1, 2, 3};
|
|
LOG(INFO) << "ABC, it's easy as " << x;
|
|
|
|
return 0;
|
|
}
|