#ifndef _LOG_H
#define _LOG_H
#include <iostream>
#include <ctime>
#define Debug 0
#define Notice 1
#define Warning 2
#define Error 3
const std::string msg[]={"Debug","Notice","Warning","Error"};
std::ostream &Log(std::string message,int level)
{
std::cout << " | " << (unsigned int)time(nullptr) << " | " << msg[level] << " | " << message << std::endl;
return std::cout;
}
#endif
Linux--给每个步骤添加日志
于 2023-08-05 09:30:21 首次发布