mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
formatter small cleanup
This commit is contained in:
parent
8b53671c06
commit
866270739c
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user