remove info_logger

This commit is contained in:
gabime 2014-03-02 16:36:06 +02:00
parent 2ac214aed8
commit 344b3d2834
2 changed files with 3 additions and 23 deletions

View File

@ -55,18 +55,12 @@ int main(int argc, char* argv[])
using std::endl;
//auto fsink2 = std::make_shared<sinks::rotating_file_sink>("log", "txt", 1024*1024*50 , 5, seconds(1));
auto &logger2 = c11log::get_logger("logger2");
//logger2.add_sink(fsink2);
logger2.add_sink(std::make_shared<sinks::null_sink>());
logger2.add_sink(std::make_shared<sinks::stdout_sink>());
info_logger info(&logger2);
info << "Hello info logger" << "!!";
return 0;
auto &my_logger = get_logger("example");
auto start = system_clock::now();
const unsigned int howmany = 10000000;
for(unsigned int i = 0; i < howmany ; i++)
logger2.info() << "Hello logger " << i;
my_logger.info() << "Hello logger " << i;
auto delta = system_clock::now() - start;
auto delta_d = duration_cast<duration<double>> (delta);

View File

@ -169,17 +169,3 @@ inline c11log::logger& c11log::get_logger(const std::string& name)
return *(c11log::details::factory::instance().get_logger(name));
}
namespace c11log {
class info_logger {
public:
info_logger (c11log::logger* logger):_logger(logger) {}
template<class T>
details::line_logger& operator<<(const T& msg) {
return _logger->info() << msg;
}
private:
c11log::logger* _logger;
};
}