1 #include <gflags/gflags.h>
2 #include <glog/logging.h>
3 #include <glog/stl_logging.h>
5 int main(int argc, char* argv[]) {
6 // Initialize Google's logging library.
7 google::InitGoogleLogging(argv[0]);
9 // Optional: parse command line flags
10 gflags::ParseCommandLineFlags(&argc, &argv, true);
12 LOG(INFO) << "Hello, world!";
14 // glog/stl_logging.h allows logging STL containers.
15 std::vector<int> x {1, 2, 3};
16 LOG(INFO) << "ABC, it's easy as " << x;