forked from andy/lizardfs
5e4ec1b514
This commit adds a new function template, which formats strings with universal {} token instead of printf-like %d, %s, %lu, etc. Change-Id: I0b259c3abe16b9bcc1c3c835b71943dae6ec5e86
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h
|
|
index 735f601..6241aa5 100644
|
|
--- a/include/spdlog/details/os.h
|
|
+++ b/include/spdlog/details/os.h
|
|
@@ -342,7 +342,7 @@ inline size_t _thread_id()
|
|
//Return current thread id as size_t (from thread local storage)
|
|
inline size_t thread_id()
|
|
{
|
|
-#if defined(_MSC_VER) && (_MSC_VER < 1900) || defined(__clang__) && !__has_feature(cxx_thread_local)
|
|
+#if !defined(LIZARDFS_HAVE_THREAD_LOCAL) || defined(_MSC_VER) && (_MSC_VER < 1900) || defined(__clang__) && !__has_feature(cxx_thread_local)
|
|
return _thread_id();
|
|
#else
|
|
static thread_local const size_t tid = _thread_id();
|
|
diff -u -r a/include/spdlog/details/logger_impl.h b/include/spdlog/details/logger_impl.h
|
|
--- a/include/spdlog/details/logger_impl.h 2017-08-19 17:48:43.000000000 +0200
|
|
+++ b/include/spdlog/details/logger_impl.h 2017-10-12 13:04:38.134993945 +0200
|
|
@@ -326,6 +326,7 @@
|
|
|
|
#ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
|
#include <codecvt>
|
|
+#include <locale>
|
|
|
|
template <typename... Args>
|
|
inline void spdlog::logger::log(level::level_enum lvl, const wchar_t* msg)
|
|
@@ -399,7 +400,7 @@
|
|
{
|
|
if (flag)
|
|
{
|
|
- log(lvl, fmt, args);
|
|
+ log(lvl, fmt, args...);
|
|
}
|
|
}
|