logic: fixed crash that occurred in some cases when logging the clang invocation

This commit is contained in:
mlangkabel
2018-08-31 13:19:52 +02:00
parent bac68a93df
commit ea68229303
3 changed files with 36 additions and 8 deletions
+6 -1
View File
@@ -35,7 +35,7 @@ void LogManager::setLoggingEnabled(bool enabled)
if (enabled)
{
LOG_INFO(
std::string("Enabled logging for Sourcetrail ") +
std::string("Enabled logging for Sourcetrail ") +
(utility::getApplicationArchitectureType() == APPLICATION_ARCHITECTURE_X86_32 ? "32" : "64") + " bit, " +
"version " + Version::getApplicationVersion().toDisplayString()
);
@@ -49,6 +49,11 @@ void LogManager::setLoggingEnabled(bool enabled)
}
}
bool LogManager::getLoggingEnabled() const
{
return m_loggingEnabled;
}
void LogManager::addLogger(std::shared_ptr<Logger> logger)
{
m_logManagerImplementation.addLogger(logger);
+1
View File
@@ -15,6 +15,7 @@ public:
~LogManager();
void setLoggingEnabled(bool enabled);
bool getLoggingEnabled() const;
void addLogger(std::shared_ptr<Logger> logger);
void removeLogger(std::shared_ptr<Logger> logger);