File: main.cc

package info (click to toggle)
google-glog 0.6.0-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,336 kB
  • sloc: cpp: 9,590; sh: 141; ansic: 115; makefile: 47
file content (22 lines) | stat: -rw-r--r-- 515 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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;
  x.push_back(1);
  x.push_back(2);
  x.push_back(3);
  LOG(INFO) << "ABC, it's easy as " << x;

  return 0;
}