Added a forceable level to non source loc required methods
This commit is contained in:
parent
2e29c2a284
commit
7227fa78ee
@ -104,6 +104,12 @@ public:
|
|||||||
log(source_loc{}, lvl, fmt, args...);
|
log(source_loc{}, lvl, fmt, args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename... Args>
|
||||||
|
void log(level::forceable lvl, string_view_t fmt, const Args &... args)
|
||||||
|
{
|
||||||
|
log(source_loc{}, lvl, fmt, args...);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void trace(string_view_t fmt, const Args &... args)
|
void trace(string_view_t fmt, const Args &... args)
|
||||||
{
|
{
|
||||||
@ -146,6 +152,12 @@ public:
|
|||||||
log(source_loc{}, lvl, msg);
|
log(source_loc{}, lvl, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void log(level::forceable lvl, const T &msg)
|
||||||
|
{
|
||||||
|
log(source_loc{}, lvl, msg);
|
||||||
|
}
|
||||||
|
|
||||||
// T can be statically converted to string_view
|
// T can be statically converted to string_view
|
||||||
template<class T, typename std::enable_if<std::is_convertible<const T &, spdlog::string_view_t>::value, T>::type * = nullptr>
|
template<class T, typename std::enable_if<std::is_convertible<const T &, spdlog::string_view_t>::value, T>::type * = nullptr>
|
||||||
void log(source_loc loc, level::level_enum lvl, const T &msg) {
|
void log(source_loc loc, level::level_enum lvl, const T &msg) {
|
||||||
@ -176,6 +188,11 @@ public:
|
|||||||
log(source_loc{}, lvl, msg);
|
log(source_loc{}, lvl, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void log(level::forceable lvl, string_view_t msg)
|
||||||
|
{
|
||||||
|
log(source_loc{}, lvl, msg);
|
||||||
|
}
|
||||||
|
|
||||||
// T cannot be statically converted to string_view or wstring_view
|
// T cannot be statically converted to string_view or wstring_view
|
||||||
template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value &&
|
template<class T, typename std::enable_if<!std::is_convertible<const T &, spdlog::string_view_t>::value &&
|
||||||
!is_convertible_to_wstring_view<const T &>::value,
|
!is_convertible_to_wstring_view<const T &>::value,
|
||||||
@ -268,6 +285,12 @@ public:
|
|||||||
log(source_loc{}, lvl, fmt, args...);
|
log(source_loc{}, lvl, fmt, args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename... Args>
|
||||||
|
void log(level::forceable lvl, wstring_view_t fmt, const Args &... args)
|
||||||
|
{
|
||||||
|
log(source_loc{}, lvl, fmt, args...);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void trace(wstring_view_t fmt, const Args &... args)
|
void trace(wstring_view_t fmt, const Args &... args)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user