intmain(int argc,char* argv[]){
string home ="./log/";//要先创建此目录,否则运行报错.
google::InitGoogleLogging(argv[0]);
string info_log = home +"master_info_";
google::SetLogDestination(google::INFO, info_log.c_str());
string warning_log = home +"master_warning_";
google::SetLogDestination(google::WARNING, warning_log.c_str());
string error_log = home +"master_error_";
google::SetLogDestination(google::ERROR, error_log.c_str());
string fatal_log = home +"master_fatal_";
google::SetLogDestination(google::FATAL, fatal_log.c_str());// You can specify one of the following severity levels (in increasing order of severity)LOG(INFO)<<"info";LOG(WARNING)<<"warning";LOG(ERROR)<<"error";LOG(FATAL)<<"fatal";// Logging a FATAL message terminates the program (after the message is logged)!return0;}