spdlog/example/example.cpp

29 lines
467 B
C++
Raw Normal View History

2014-02-22 04:51:54 +08:00
// example.cpp : Simple logger example
2014-01-25 21:52:10 +08:00
//
2014-10-12 09:40:11 +08:00
#define FFLOG_ENABLE_TRACE
#include <iostream>
2014-01-27 03:23:26 +08:00
#include "c11log/logger.h"
2014-10-12 09:40:11 +08:00
#include "c11log/factory.h"
2014-10-10 07:46:03 +08:00
#include "c11log/sinks/stdout_sinks.h"
2014-10-12 09:40:11 +08:00
#include "c11log/sinks/file_sinks.h"
using namespace std;
2014-10-19 00:04:24 +08:00
using namespace c11log;
2014-10-10 07:46:03 +08:00
2014-03-04 07:23:38 +08:00
2014-10-19 00:04:24 +08:00
details::fast_oss f(const std::string& what)
{
details::fast_oss oss;
oss << what;
return oss;
}
int main_(int, char* [])
{
2014-10-10 08:36:50 +08:00
2014-10-19 00:04:24 +08:00
auto foss = f("test2");
foss.str();
2014-03-29 06:37:29 +08:00
return 0;
}
2014-01-25 21:52:10 +08:00