 |
Livox SDK API
V2.0.0
|
Go to the documentation of this file.
13 #include <initializer_list>
18 #include <type_traits>
19 #include <unordered_map>
21 #if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
31 #if defined(_MSC_VER) && (_MSC_VER < 1900)
32 #define SPDLOG_NOEXCEPT throw()
33 #define SPDLOG_CONSTEXPR
35 #define SPDLOG_NOEXCEPT noexcept
36 #define SPDLOG_CONSTEXPR constexpr
39 #if defined(__GNUC__) || defined(__clang__)
40 #define SPDLOG_DEPRECATED __attribute__((deprecated))
41 #elif defined(_MSC_VER)
42 #define SPDLOG_DEPRECATED __declspec(deprecated)
44 #define SPDLOG_DEPRECATED
49 #if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__cplusplus_winrt)
50 #define SPDLOG_NO_TLS 1
55 #if FMT_HAS_FEATURE(__builtin_strrchr)
56 #define SPDLOG_STRRCHR(str, sep) __builtin_strrchr(str, sep)
58 #define SPDLOG_STRRCHR(str, sep) strrchr(str, sep)
59 #endif //__builtin_strrchr not defined
62 #define SPDLOG_FILE_BASENAME(file) SPDLOG_STRRCHR("\\" file, '\\') + 1
64 #define SPDLOG_FILE_BASENAME(file) SPDLOG_STRRCHR("/" file, '/') + 1
67 #ifndef SPDLOG_FUNCTION
68 #define SPDLOG_FUNCTION __FUNCTION__
85 #if defined(FMT_USE_STD_STRING_VIEW)
91 #if defined(SPDLOG_NO_ATOMIC_LEVELS)
97 #define SPDLOG_LEVEL_TRACE 0
98 #define SPDLOG_LEVEL_DEBUG 1
99 #define SPDLOG_LEVEL_INFO 2
100 #define SPDLOG_LEVEL_WARN 3
101 #define SPDLOG_LEVEL_ERROR 4
102 #define SPDLOG_LEVEL_CRITICAL 5
103 #define SPDLOG_LEVEL_OFF 6
105 #if !defined(SPDLOG_ACTIVE_LEVEL)
106 #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO
122 #if !defined(SPDLOG_LEVEL_NAMES)
123 #define SPDLOG_LEVEL_NAMES \
125 "trace", "debug", "info", "warning", "error", "critical", "off" \
130 #if !defined(SPDLOG_SHORT_LEVEL_NAMES)
131 #define SPDLOG_SHORT_LEVEL_NAMES {"T", "D", "I", "W", "E", "C", "O"}
150 if (level_str == name)
152 return static_cast<level::level_enum>(level);
179 : msg_(
std::move(msg))
202 #if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES)
218 ,
line{static_cast<uint32_t>(line_in)}
235 #if __cplusplus >= 201402L // C++14 and beyond
238 template<
typename T,
typename... Args>
241 static_assert(!std::is_array<T>::value,
"arrays not supported");
242 return std::unique_ptr<T>(
new T(std::forward<Args>(args)...));
#define SPDLOG_LEVEL_DEBUG
std::function< void(const std::string &err_msg)> log_err_handler
#define SPDLOG_LEVEL_INFO
#define SPDLOG_LEVEL_NAMES
static const char * short_level_names[]
std::shared_ptr< sinks::sink > sink_ptr
void format_system_error(internal::buffer &out, int error_code, string_view message)
spdlog::level::level_enum from_str(const std::string &name) noexcept
std::atomic< int > level_t
const char * to_short_c_str(spdlog::level::level_enum l) noexcept
std::initializer_list< sink_ptr > sinks_init_list
#define SPDLOG_LEVEL_TRACE
std::string to_string(const T &value)
std::chrono::system_clock log_clock
#define SPDLOG_LEVEL_WARN
spdlog_ex(std::string msg)
string_view_t & to_string_view(spdlog::level::level_enum l) noexcept
#define SPDLOG_LEVEL_CRITICAL
static string_view_t level_string_views[]
std::unique_ptr< T > make_unique(Args &&... args)
basic_string_view< char > string_view
#define SPDLOG_SHORT_LEVEL_NAMES
#define SPDLOG_LEVEL_ERROR
constexpr source_loc(const char *filename_in, int line_in, const char *funcname_in)
std::hash< int > level_hasher
spdlog_ex(const std::string &msg, int last_errno)
constexpr bool empty() const noexcept
const char * what() const noexcept override