spdlog/include/spdlog/formatter.h

19 lines
460 B
C
Raw Normal View History

2019-05-12 01:06:17 +08:00
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
2016-04-20 16:57:49 +08:00
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
2018-06-24 06:32:39 +08:00
#include "fmt/fmt.h"
2018-04-29 06:35:49 +08:00
#include "spdlog/details/log_msg.h"
2016-04-20 16:57:49 +08:00
2018-03-09 21:26:33 +08:00
namespace spdlog {
2016-04-20 16:57:49 +08:00
class formatter
{
public:
2018-02-25 06:56:56 +08:00
virtual ~formatter() = default;
2018-06-24 06:32:39 +08:00
virtual void format(const details::log_msg &msg, fmt::memory_buffer &dest) = 0;
2018-07-23 05:13:52 +08:00
virtual std::unique_ptr<formatter> clone() const = 0;
2016-04-20 16:57:49 +08:00
};
2018-03-09 21:26:33 +08:00
} // namespace spdlog