This commit is contained in:
gabime
2019-03-30 14:53:02 +03:00
parent e32c856a04
commit c2b0e223fa
8 changed files with 202 additions and 137 deletions

View File

@@ -1,4 +1,3 @@
//
// Copyright(c) 2015-present Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
@@ -211,55 +210,6 @@ protected:
void log_formatted_(spdlite::level lvl, const fmt::memory_buffer &formatted);
};
//
// spdlite namespace functions - forward the calls to the default_logger.
//
spdlite::logger &default_logger();
template<typename... Args>
inline void trace(const char *fmt, const Args &... args)
{
default_logger().trace(fmt, args...);
}
template<typename... Args>
inline void debug(const char *fmt, const Args &... args)
{
default_logger().debug(fmt, args...);
}
template<typename... Args>
inline void info(const char *fmt, const Args &... args)
{
default_logger().info(fmt, args...);
}
template<typename... Args>
inline void warn(const char *fmt, const Args &... args)
{
default_logger().warn(fmt, args...);
}
template<typename... Args>
inline void error(const char *fmt, const Args &... args)
{
default_logger().error(fmt, args...);
}
template<typename... Args>
inline void critical(const char *fmt, const Args &... args)
{
default_logger().critical(fmt, args...);
}
void log_printf(spdlite::level lvl, const char *format, va_list args);
void trace_printf(const char *format, ...);
void debug_printf(const char *format, ...);
void info_printf(const char *format, ...);
void warn_printf(const char *format, ...);
void error_printf(const char *format, ...);
void critical_printf(const char *format, ...);
} // namespace spdlite