4
0
mirror of https://github.com/QuasarApp/LIEF.git synced 2025-05-01 06:44:32 +00:00

Log improvements

This commit is contained in:
rthomas 2020-11-10 06:32:12 +01:00
parent 1364f22c78
commit a35a97aa83

@ -51,6 +51,7 @@ using std::chrono::milliseconds;
namespace LIEF {
namespace logging {
// TODO(romain): Update when moving to C++17
class Logger {
public:
Logger(const Logger&) = delete;
@ -69,8 +70,10 @@ class Logger {
template <typename... Args>
static void trace(const char *fmt, const Args &... args) {
if /* constexpr */ (lief_logging_support and lief_logging_debug) {
Logger::instance().sink_->trace(fmt, args...);
}
}
template <typename... Args>
static void debug(const char *fmt, const Args &... args) {
@ -107,7 +110,7 @@ class Logger {
Logger& operator=(Logger&&);
static void destroy(void);
static Logger* instance_;
/* inline */ static Logger* instance_;
std::shared_ptr<spdlog::logger> sink_;
};