最近学习log4cpp,试着封装了下,mark下。
#include<iostream>
#include<log4cpp/Category.hh>
#include<log4cpp/Appender.hh>
#include<log4cpp/FileAppender.hh>
#include<log4cpp/RollingFileAppender.hh>
#include<log4cpp/OstreamAppender.hh>
#include<log4cpp/PatternLayout.hh>
#include<log4cpp/Priority.hh>
using namespace std;
//1.实现日志文件信息在终端上显示
//2.实现日志文件信息在终端和日志文件同时显示
//3.实现回滚备份,替换掉2即可
class Mylog
{
public:
Mylog();
~Mylog();
public:
void error(const char * msg);
void warn(const char * msg);
void info(const char * msg);
void debug(const