mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-12 17:00:25 +08:00
Pass source loc by ref to log_msg
This commit is contained in:
parent
04004e57c2
commit
adaf0554be
@ -11,8 +11,8 @@ namespace spdlog {
|
||||
namespace details {
|
||||
struct SPDLOG_API log_msg {
|
||||
log_msg() = default;
|
||||
log_msg(log_clock::time_point log_time, source_loc loc, string_view_t logger_name, level lvl, string_view_t msg);
|
||||
log_msg(source_loc loc, string_view_t logger_name, level lvl, string_view_t msg);
|
||||
log_msg(log_clock::time_point log_time, const source_loc &loc, string_view_t logger_name, level lvl, string_view_t msg);
|
||||
log_msg(const source_loc &loc, string_view_t logger_name, level lvl, string_view_t msg);
|
||||
log_msg(string_view_t logger_name, level lvl, string_view_t msg);
|
||||
log_msg(const log_msg &other) = default;
|
||||
log_msg &operator=(const log_msg &other) = default;
|
||||
|
@ -8,12 +8,12 @@
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
|
||||
log_msg::log_msg(spdlog::log_clock::time_point log_time,
|
||||
spdlog::source_loc loc,
|
||||
string_view_t a_logger_name,
|
||||
spdlog::level lvl,
|
||||
spdlog::string_view_t msg)
|
||||
: logger_name(a_logger_name),
|
||||
log_msg::log_msg(const log_clock::time_point log_time,
|
||||
const source_loc &loc,
|
||||
const string_view_t logger_name,
|
||||
const level lvl,
|
||||
const string_view_t msg)
|
||||
: logger_name(logger_name),
|
||||
log_level(lvl),
|
||||
time(log_time),
|
||||
#ifdef SPDLOG_NO_THREAD_ID
|
||||
@ -25,11 +25,11 @@ log_msg::log_msg(spdlog::log_clock::time_point log_time,
|
||||
payload(msg) {
|
||||
}
|
||||
|
||||
log_msg::log_msg(spdlog::source_loc loc, string_view_t a_logger_name, spdlog::level lvl, spdlog::string_view_t msg)
|
||||
: log_msg(os::now(), loc, a_logger_name, lvl, msg) {}
|
||||
log_msg::log_msg(const source_loc &loc, const string_view_t logger_name, const level lvl, const string_view_t msg)
|
||||
: log_msg(os::now(), loc, logger_name, lvl, msg) {}
|
||||
|
||||
log_msg::log_msg(string_view_t a_logger_name, spdlog::level lvl, spdlog::string_view_t msg)
|
||||
: log_msg(os::now(), source_loc{}, a_logger_name, lvl, msg) {}
|
||||
log_msg::log_msg(const string_view_t logger_name, const level lvl, const string_view_t msg)
|
||||
: log_msg(os::now(), source_loc{}, logger_name, lvl, msg) {}
|
||||
|
||||
} // namespace details
|
||||
} // namespace spdlog
|
||||
|
Loading…
Reference in New Issue
Block a user