summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Logging/LogManager.cpp
diff options
context:
space:
mode:
authorMichael Maltese <michaeljosephmaltese@gmail.com>2017-04-23 23:55:37 -0700
committerMichael Maltese <michaeljosephmaltese@gmail.com>2017-05-27 18:28:57 -0700
commitd416cbd9ed5efb391ad65c36ded74c17ab713622 (patch)
tree88d01f6fe28d6c1312eb19c68693aa3d728f66bf /Source/Core/Common/Logging/LogManager.cpp
parent34ad1eb5476b64c3697a26f0d4e74493aa075b2b (diff)
Add CubebUtils namespace and hook up cubeb logging
Diffstat (limited to 'Source/Core/Common/Logging/LogManager.cpp')
-rw-r--r--Source/Core/Common/Logging/LogManager.cpp10
1 files changed, 7 insertions, 3 deletions
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
@@ -130,6 +130,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)