Photon 1.0.0
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
11{
12 namespace details
13 {
14
16 : log_msg{orig_msg}
17 {
18 buffer.append(logger_name.begin(), logger_name.end());
19 buffer.append(payload.begin(), payload.end());
21 }
22
30
32 {
33 update_string_views();
34 }
35
37 {
38 log_msg::operator=(other);
39 buffer.clear();
40 buffer.append(other.buffer.data(), other.buffer.data() + other.buffer.size());
42 return *this;
43 }
44
46 {
47 log_msg::operator=(other);
48 buffer = std::move(other.buffer);
49 update_string_views();
50 return *this;
51 }
52
58
59 } // namespace details
60} // namespace spdlog
Definition core.h:1032
void append(const U *begin, const U *end)
void clear()
Definition core.h:1114
FMT_CONSTEXPR auto data() noexcept -> T *
Definition core.h:1102
Definition log_msg_buffer.h:17
memory_buf_t buffer
Definition log_msg_buffer.h:18
log_msg_buffer & operator=(const log_msg_buffer &other)
Definition log_msg_buffer-inl.h:36
void update_string_views()
Definition log_msg_buffer-inl.h:53
#define SPDLOG_NOEXCEPT
Definition common.h:69
#define SPDLOG_INLINE
Definition common.h:47
Definition async.h:26
fmt::basic_string_view< char > string_view_t
Definition common.h:172
Definition log_msg.h:14
log_msg & operator=(const log_msg &other)=default
string_view_t payload
Definition log_msg.h:32
string_view_t logger_name
Definition log_msg.h:22
annotation details
Definition tag_strings.h:125