mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-26 15:39:03 +08:00
Windows/wchar problems
Mixing char types in libfmt is a problem and WIP.
This commit is contained in:
parent
c98b29aa67
commit
df45d78d14
@ -80,11 +80,7 @@ SPDLOG_INLINE void spdlog::async_logger::backend_flush_()
|
|||||||
{
|
{
|
||||||
sink->flush();
|
sink->flush();
|
||||||
}
|
}
|
||||||
#if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32)
|
SPDLOG_LOGGER_CATCH("")
|
||||||
SPDLOG_LOGGER_CATCH(wstring_view_t())
|
|
||||||
#else
|
|
||||||
SPDLOG_LOGGER_CATCH(string_view_t())
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,11 +203,7 @@ SPDLOG_INLINE void logger::flush_()
|
|||||||
{
|
{
|
||||||
sink->flush();
|
sink->flush();
|
||||||
}
|
}
|
||||||
#if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32)
|
SPDLOG_LOGGER_CATCH("")
|
||||||
SPDLOG_LOGGER_CATCH(wstring_view_t())
|
|
||||||
#else
|
|
||||||
SPDLOG_LOGGER_CATCH(string_view_t())
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +356,9 @@ protected:
|
|||||||
details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size()));
|
details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size()));
|
||||||
log_it_(log_msg, log_enabled, traceback_enabled);
|
log_it_(log_msg, log_enabled, traceback_enabled);
|
||||||
}
|
}
|
||||||
SPDLOG_LOGGER_CATCH(fmt)
|
// TODO: This isn't working yet.
|
||||||
|
SPDLOG_LOGGER_CATCH("")
|
||||||
|
//SPDLOG_LOGGER_CATCH(fmt)
|
||||||
}
|
}
|
||||||
|
|
||||||
// T can be statically converted to wstring_view, and no formatting needed.
|
// T can be statically converted to wstring_view, and no formatting needed.
|
||||||
@ -376,7 +378,9 @@ protected:
|
|||||||
details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size()));
|
details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size()));
|
||||||
log_it_(log_msg, log_enabled, traceback_enabled);
|
log_it_(log_msg, log_enabled, traceback_enabled);
|
||||||
}
|
}
|
||||||
SPDLOG_LOGGER_CATCH(msg)
|
// TODO: This isn't working yet.
|
||||||
|
SPDLOG_LOGGER_CATCH("")
|
||||||
|
//SPDLOG_LOGGER_CATCH(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT
|
||||||
|
Loading…
Reference in New Issue
Block a user