spdlog/include/spdlog/details/log_msg.h

36 lines
953 B
C
Raw Normal View History

2019-06-03 17:09:16 -04:00
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
2016-04-20 04:57:49 -04:00
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
2018-04-28 18:43:42 -04:00
#include "spdlog/common.h"
2019-08-22 12:36:47 -04:00
#include <string>
2016-04-20 04:57:49 -04:00
2018-03-17 06:47:46 -04:00
namespace spdlog {
namespace details {
2016-04-20 04:57:49 -04:00
struct log_msg
{
2019-08-22 12:36:47 -04:00
log_msg() = default;
log_msg(source_loc loc, string_view_t logger_name, level::level_enum lvl, string_view_t msg);
log_msg(string_view_t logger_name, level::level_enum lvl, string_view_t msg);
log_msg(const log_msg &other) = default;
2016-04-20 04:57:49 -04:00
2019-08-22 12:36:47 -04:00
string_view_t logger_name;
level::level_enum level{level::off};
2016-04-20 04:57:49 -04:00
log_clock::time_point time;
size_t thread_id{0};
2018-10-29 18:54:22 -04:00
// wrapping the formatted text with color (updated by pattern_formatter).
2018-06-23 18:32:39 -04:00
mutable size_t color_range_start{0};
mutable size_t color_range_end{0};
2018-11-22 11:47:50 -05:00
source_loc source;
2019-08-22 12:36:47 -04:00
string_view_t payload;
2016-04-20 04:57:49 -04:00
};
2018-03-17 06:47:46 -04:00
} // namespace details
} // namespace spdlog
2019-04-09 09:42:44 -04:00
#ifdef SPDLOG_HEADER_ONLY
2019-05-11 06:19:53 -04:00
#include "log_msg-inl.h"
2019-04-27 11:44:48 -04:00
#endif