You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
353 B

#include <glog/logging.h>
int main(int argc, char* argv[]) {
// 初始化glog
google::InitGoogleLogging(argv[0]);
// 设置日志级别
FLAGS_logtostderr = 1;
// 记录日志
LOG(INFO) << "This is an info message";
LOG(WARNING) << "This is a warning message";
LOG(ERROR) << "This is an error message";
return 0;
}