Commit a0a7dd01 authored by JYJSXX's avatar JYJSXX

test

parent 817df42c
add_executable(
lab0_debug main.cpp Human.cpp Student.cpp logging.cpp
)
add_executable(
test_logging test_logging.cpp
)
\ No newline at end of file
......@@ -4,7 +4,6 @@
#include <stdio.h>
#include "Human.hpp"
#include "Student.hpp"
#include "logging.hpp"
#include <vector>
class check{
......@@ -32,8 +31,6 @@ int main(int argc, char** argv){
auto student1 = static_cast<Student*>(vec.back());
// check check1 = check(vec.back()); //TODO: Error 2 : why?
check check1 = check(student1);
// LOG(DEBUG) << student1->print();
// LOG(WARNING) << human.print();
// std::list<int> list;
// list.push_back(1);
......
#include "logging.hpp"
// 引入头文件
int main(){
LOG(DEBUG) << "This is DEBUG log item.";
// 使用关键字 LOG,括号中填入要输出的日志等级
// 紧接着就是<<以及日志的具体信息,就跟使用 std::cout 一样
LOG(INFO) << "This is INFO log item";
LOG(WARNING) << "This is WARNING log item";
LOG(ERROR) << "This is ERROR log item";
return 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment