mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 10:29:02 +08:00
Support for source file/line logging
This commit is contained in:
@@ -46,8 +46,13 @@ public:
|
||||
template<typename... Args>
|
||||
void log(level::level_enum lvl, const char *fmt, const Args &... args);
|
||||
|
||||
template<typename... Args>
|
||||
void log(source_loc loc, level::level_enum lvl, const char *fmt, const Args &... args);
|
||||
|
||||
void log(level::level_enum lvl, const char *msg);
|
||||
|
||||
void log(source_loc loc, level::level_enum lvl, const char *msg);
|
||||
|
||||
template<typename... Args>
|
||||
void trace(const char *fmt, const Args &... args);
|
||||
|
||||
@@ -73,6 +78,9 @@ public:
|
||||
template<typename... Args>
|
||||
void log(level::level_enum lvl, const wchar_t *fmt, const Args &... args);
|
||||
|
||||
template<typename... Args>
|
||||
void log(source_location soruce, level::level_enum lvl, const wchar_t *fmt, const Args &... args);
|
||||
|
||||
template<typename... Args>
|
||||
void trace(const wchar_t *fmt, const Args &... args);
|
||||
|
||||
@@ -97,10 +105,18 @@ public:
|
||||
template<class T, typename std::enable_if<std::is_convertible<T, spdlog::string_view_t>::value, T>::type * = nullptr>
|
||||
void log(level::level_enum lvl, const T &);
|
||||
|
||||
// T can be statically converted to string_view
|
||||
template<class T, typename std::enable_if<std::is_convertible<T, spdlog::string_view_t>::value, T>::type * = nullptr>
|
||||
void log(source_loc loc, level::level_enum lvl, const T &);
|
||||
|
||||
// T cannot be statically converted to string_view
|
||||
template<class T, typename std::enable_if<!std::is_convertible<T, spdlog::string_view_t>::value, T>::type * = nullptr>
|
||||
void log(level::level_enum lvl, const T &);
|
||||
|
||||
// T cannot be statically converted to string_view
|
||||
template<class T, typename std::enable_if<!std::is_convertible<T, spdlog::string_view_t>::value, T>::type * = nullptr>
|
||||
void log(source_loc loc, level::level_enum lvl, const T &);
|
||||
|
||||
template<typename T>
|
||||
void trace(const T &msg);
|
||||
|
||||
|
Reference in New Issue
Block a user