From d416cbd9ed5efb391ad65c36ded74c17ab713622 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sun, 23 Apr 2017 23:55:37 -0700 Subject: Add CubebUtils namespace and hook up cubeb logging --- Source/Core/Common/Logging/LogManager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Source/Core/Common/Logging/LogManager.cpp') diff --git a/Source/Core/Common/Logging/LogManager.cpp b/Source/Core/Common/Logging/LogManager.cpp index 18fd57fd43..3b2d925047 100644 --- a/Source/Core/Common/Logging/LogManager.cpp +++ b/Source/Core/Common/Logging/LogManager.cpp @@ -129,6 +129,12 @@ LogManager::~LogManager() void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line, const char* format, va_list args) +{ + return LogWithFullPath(level, type, file + m_path_cutoff_point, line, format, args); +} + +void LogManager::LogWithFullPath(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, + const char* file, int line, const char* format, va_list args) { char temp[MAX_MSGLEN]; LogContainer* log = m_Log[type]; @@ -138,10 +144,8 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const CharArrayFromFormatV(temp, MAX_MSGLEN, format, args); - const char* path_to_print = file + m_path_cutoff_point; - std::string msg = StringFromFormat( - "%s %s:%u %c[%s]: %s\n", Common::Timer::GetTimeFormatted().c_str(), path_to_print, line, + "%s %s:%u %c[%s]: %s\n", Common::Timer::GetTimeFormatted().c_str(), file, line, LogTypes::LOG_LEVEL_TO_CHAR[(int)level], log->GetShortName().c_str(), temp); for (auto listener_id : *log) -- cgit v1.2.3