formatter small cleanup

This commit is contained in:
gabime 2014-03-28 12:52:36 +03:00
parent 8b53671c06
commit 866270739c
2 changed files with 6 additions and 6 deletions

View File

@ -3,10 +3,9 @@
#include <string> #include <string>
#include <chrono> #include <chrono>
#include <functional> #include <functional>
#include <sstream>
#include <iomanip> #include <iomanip>
#include <thread> #include <thread>
#include <cstdlib>
#include <cstring> #include <cstring>
#include "common_types.h" #include "common_types.h"
@ -18,14 +17,14 @@ namespace c11log
namespace formatters namespace formatters
{ {
typedef std::function<std::string(const std::string& logger_name, const std::string&, level::level_enum, const c11log::log_clock::time_point&)> format_fn;
class formatter class formatter
{ {
public: public:
formatter() {} formatter() = default;
virtual ~formatter() {} virtual ~formatter() = default;
formatter(const formatter&) = delete;
formatter& operator=(const formatter&) = delete;
virtual void format_header(const std::string& logger_name, level::level_enum level, const log_clock::time_point& tp, std::ostream& dest) = 0; virtual void format_header(const std::string& logger_name, level::level_enum level, const log_clock::time_point& tp, std::ostream& dest) = 0;
}; };

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include <fstream> #include <fstream>
#include <sstream>
#include <iomanip> #include <iomanip>
#include <mutex> #include <mutex>
#include "base_sink.h" #include "base_sink.h"