spdlog
Loading...
Searching...
No Matches
log_msg-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
10#include <spdlog/details/os.h>
11
12namespace spdlog {
13namespace details {
14
15SPDLOG_INLINE log_msg::log_msg(spdlog::log_clock::time_point log_time, spdlog::source_loc loc, string_view_t a_logger_name,
17 : logger_name(a_logger_name)
18 , level(lvl)
19 , time(log_time)
20#ifndef SPDLOG_NO_THREAD_ID
21 , thread_id(os::thread_id())
22#endif
23 , source(loc)
24 , payload(msg)
25{}
26
27SPDLOG_INLINE log_msg::log_msg(
29 : log_msg(os::now(), loc, a_logger_name, lvl, msg)
30{}
31
33 : log_msg(os::now(), source_loc{}, a_logger_name, lvl, msg)
34{}
35
36} // namespace details
37} // namespace spdlog
#define SPDLOG_INLINE
Definition common.h:33
SPDLOG_INLINE size_t thread_id() SPDLOG_NOEXCEPT
Definition os-inl.h:357
Definition async.h:25
fmt::basic_string_view< char > string_view_t
Definition common.h:114
T time(T... args)