Photon 1.0.0
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
13{
14 namespace details
15 {
16
17 SPDLOG_INLINE log_msg::log_msg(spdlog::log_clock::time_point log_time, spdlog::source_loc loc, string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg)
18 : logger_name(a_logger_name), level(lvl), time(log_time)
19#ifndef SPDLOG_NO_THREAD_ID
20 ,
21 thread_id(os::thread_id())
22#endif
23 ,
24 source(loc), payload(msg)
25 {
26 }
27
28 SPDLOG_INLINE log_msg::log_msg(
30 : log_msg(os::now(), loc, a_logger_name, lvl, msg)
31 {
32 }
33
35 : log_msg(os::now(), source_loc{}, a_logger_name, lvl, msg)
36 {
37 }
38
39 } // namespace details
40} // namespace spdlog
#define SPDLOG_INLINE
Definition common.h:47
SPDLOG_INLINE size_t thread_id() SPDLOG_NOEXCEPT
Definition os-inl.h:369
level_enum
Definition common.h:233
Definition async.h:26
fmt::basic_string_view< char > string_view_t
Definition common.h:172
Definition log_msg.h:14
Definition common.h:312
source
Definition tag_strings.h:83
annotation details
Definition tag_strings.h:125
time
Definition tag_strings.h:53