[installation]

github에서 clone하지 않고도 다음과 같은 명령어로 google test를 설치할 수 있다.

sudo apt install libgoogle-glog-dev




[sample code]

간단한 샘플 코드를 만든다.

#include <glog/logging.h>

int main() {
  LOG(INFO) << "hello world";
  return 0;
}




[link option]

다음과 같은 링크 옵션을 주어 링크 에러를 없애도록 한다.

LIBS += -lglog




[output]

WARNING: Logging before InitGoogleLogging() is written to STDERR
I0624 20:31:46.609616 31213 main.cpp:4] hello world




[github]

google logging library는 원래 code.google.com에서 관리되었으나 지금은 github.com에서 관리되어 지고 있다.

https://github.com/google/glog




[samples]

google logging library 사용 방법을 익히도록 한다.

http://rpg.ifi.uzh.ch/docs/glog.html




[download]