Allow using glog/stl_logging.h with Bazel
[platform/upstream/glog.git] / bazel / example / main.cc
1 #include <gflags/gflags.h>
2 #include <glog/logging.h>
3 #include <glog/stl_logging.h>
4
5 int main(int argc, char* argv[]) {
6   // Initialize Google's logging library.
7   google::InitGoogleLogging(argv[0]);
8
9   // Optional: parse command line flags
10   gflags::ParseCommandLineFlags(&argc, &argv, true);
11
12   LOG(INFO) << "Hello, world!";
13
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;
17
18   return 0;
19 }