All checks were successful
Build (Arch Linux) / build (push) Successful in 3m10s
57 lines
1.2 KiB
C++
57 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "logging/logger.hpp"
|
|
|
|
namespace kuiper
|
|
{
|
|
|
|
/// @brief Singleton class providing engine-wide logging facilities
|
|
class engine_logger {
|
|
private:
|
|
engine_logger() = default;
|
|
|
|
public:
|
|
~engine_logger() = default;
|
|
|
|
public:
|
|
static inline engine_logger& get(void) {
|
|
static engine_logger s_instance;
|
|
return s_instance;
|
|
}
|
|
|
|
template<typename... Args>
|
|
inline void trace(const char* fmt, Args... args) {
|
|
m_log.trace(fmt, args...);
|
|
}
|
|
|
|
template<typename... Args>
|
|
inline void debug(const char* fmt, Args... args) {
|
|
m_log.debug(fmt, args...);
|
|
}
|
|
|
|
template<typename... Args>
|
|
inline void info(const char* fmt, Args... args) {
|
|
m_log.info(fmt, args...);
|
|
}
|
|
|
|
template<typename... Args>
|
|
inline void warn(const char* fmt, Args... args) {
|
|
m_log.warn(fmt, args...);
|
|
}
|
|
|
|
template<typename... Args>
|
|
inline void error(const char* fmt, Args... args) {
|
|
m_log.error(fmt, args...);
|
|
}
|
|
|
|
template<typename... Args>
|
|
inline void critical(const char* fmt, Args... args) {
|
|
m_log.critical(fmt, args...);
|
|
}
|
|
|
|
private:
|
|
kuiper::logger m_log {"engine"};
|
|
};
|
|
|
|
} // namespace kuiper
|