diff --git a/src/util/log/log.cpp b/src/util/log/log.cpp index fc5f6ec21..ab399ac65 100644 --- a/src/util/log/log.cpp +++ b/src/util/log/log.cpp @@ -15,31 +15,36 @@ namespace dxvk { void Logger::trace(const std::string& message) { - s_instance.log(LogLevel::Trace, message); + s_instance.emitMsg(LogLevel::Trace, message); } void Logger::debug(const std::string& message) { - s_instance.log(LogLevel::Debug, message); + s_instance.emitMsg(LogLevel::Debug, message); } void Logger::info(const std::string& message) { - s_instance.log(LogLevel::Info, message); + s_instance.emitMsg(LogLevel::Info, message); } void Logger::warn(const std::string& message) { - s_instance.log(LogLevel::Warn, message); + s_instance.emitMsg(LogLevel::Warn, message); } void Logger::err(const std::string& message) { - s_instance.log(LogLevel::Error, message); + s_instance.emitMsg(LogLevel::Error, message); } void Logger::log(LogLevel level, const std::string& message) { + s_instance.emitMsg(level, message); + } + + + void Logger::emitMsg(LogLevel level, const std::string& message) { if (level >= m_minLevel) { std::lock_guard lock(m_mutex); diff --git a/src/util/log/log.h b/src/util/log/log.h index 651e57b19..caa606bed 100644 --- a/src/util/log/log.h +++ b/src/util/log/log.h @@ -35,6 +35,7 @@ namespace dxvk { static void info (const std::string& message); static void warn (const std::string& message); static void err (const std::string& message); + static void log (LogLevel level, const std::string& message); static LogLevel logLevel() { return s_instance.m_minLevel; @@ -49,7 +50,7 @@ namespace dxvk { std::mutex m_mutex; std::ofstream m_fileStream; - void log(LogLevel level, const std::string& message); + void emitMsg(LogLevel level, const std::string& message); static LogLevel getMinLogLevel();