#include "logger.h" #include "utils.h" namespace graft_cv{ CGcvLogger::CGcvLogger(ofstream& ofs) :m_target(terminal) ,m_level(debug) ,m_outfile(ofs) { cout<m_level <= act_level && this->m_target!= file){ cout <m_target != terminal){ m_outfile<< output_content; m_outfile.flush(); } } void CGcvLogger::DEBUG(string text) { if(debug>=m_level){ this->output(text,debug); } } void CGcvLogger::INFO(string text) { if(info>=m_level){ this->output(text,info); } } void CGcvLogger::WARNING(string text) { if(warning>=m_level){ this->output(text,warning); } } void CGcvLogger::ERRORINFO(string text) { if(error>=m_level){ this->output(text,error); } } };