Added comment about log_msg_buffer

This commit is contained in:
gabime 2023-10-02 00:04:20 +03:00
parent 61b11e77b9
commit 31d9c3cd7a

View File

@ -6,6 +6,10 @@
namespace spdlog {
namespace details {
// copy logger name and payload to buffer so can be used asynchronously
// note: source location pointers are copied without allocation since they
// are compiler generated const chars* (__FILE__, __LINE__, __FUNCTION__)
// if you pass custom strings to source location, make sure they outlive the log_msg_buffer
log_msg_buffer::log_msg_buffer(const log_msg &orig_msg)
: log_msg{orig_msg} {
buffer.append(logger_name.begin(), logger_name.end());