本文整理汇总了C++中Log::LOG_INFO方法的典型用法代码示例。如果您正苦于以下问题:C++ Log::LOG_INFO方法的具体用法?C++ Log::LOG_INFO怎么用?C++ Log::LOG_INFO使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Log
的用法示例。
在下文中一共展示了Log::LOG_INFO方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _tmain
int _tmain(int argc, _TCHAR* argv[])
{
cout << "Log Testing Application started" << endl;
//Log *log = new Log(string("log\\\\\\\\"), string("test.html"));
Log *log = Log::getInstance();
cout << "writing debug message (shouldn't work) " << LOG_DEBUG("this debug message shouldn't be here") << endl;
log->set_file_path_and_name(string("log\\\\\\\\\\\\\\"), string("test.html"));
cout << "writing debug message " << log->LOG_DEBUG("this debug message shouldn't be here") << endl;
cout << "writing info message " << log->LOG_INFO("info message") << endl;
cout << "writing warning " << log->LOG_WARNING("warning") << endl;
cout << "writing error message " << log->LOG_ERROR("error", "1") << endl;
log->debug_mode_ = true;
cout << "writing debug message " << log->LOG_DEBUG("this should be the first debug message in this file") << endl;
log->debug_mode_ = false;
cout << "writing debug message " << log->LOG_DEBUG("this debug message shouldn't be here") << endl;
log->debug_mode_ = true;
cout << "writing debug message " << LOG_DEBUG("this should be the last debug message in this file") << endl;
cout << "writing info message " << LOG_INFO("info message") << endl;
cout << "writing warning " << LOG_WARNING("warning") << endl;
cout << "writing error message " << LOG_ERROR("error", "1") << endl;
getchar();
delete log;
return 0;
}