spdlog
Loading...
Searching...
No Matches
log_msg_buffer-inl.h
Go to the documentation of this file.
1// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
2// Distributed under the MIT License (http://opensource.org/licenses/MIT)
3
4#pragma once
5
6#ifndef SPDLOG_HEADER_ONLY
8#endif
9
10namespace spdlog {
11namespace details {
12
14 : log_msg{orig_msg}
15{
16 buffer.append(logger_name.begin(), logger_name.end());
17 buffer.append(payload.begin(), payload.end());
19}
20
28
30{
31 update_string_views();
32}
33
35{
36 log_msg::operator=(other);
37 buffer.clear();
38 buffer.append(other.buffer.data(), other.buffer.data() + other.buffer.size());
40 return *this;
41}
42
44{
45 log_msg::operator=(other);
46 buffer = std::move(other.buffer);
47 update_string_views();
48 return *this;
49}
50
56
57} // namespace details
58} // namespace spdlog
Definition core.h:749
void append(const U *begin, const U *end)
void clear()
Definition core.h:803
auto data() FMT_NOEXCEPT -> T *
Definition core.h:797
log_msg_buffer & operator=(const log_msg_buffer &other)
#define SPDLOG_NOEXCEPT
Definition common.h:53
#define SPDLOG_INLINE
Definition common.h:33
Definition async.h:25
fmt::basic_string_view< char > string_view_t
Definition common.h:114
log_msg & operator=(const log_msg &other)=default
string_view_t payload
Definition log_msg.h:30
string_view_t logger_name
Definition log_msg.h:20