logic: Prevent verbose indexer logging when logging is disabled

This commit is contained in:
Eberhard Graether
2016-12-01 16:13:25 +01:00
parent 3ab86c2e4f
commit 163f3238ce
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -77,6 +77,9 @@ void JavaParser::parseFile(const FilePath& filePath, std::shared_ptr<TextAccess>
// remove tabs because they screw with javaparser's location resolver
std::string fileContent = utility::replace(textAccess->getText(), "\t", " ");
int verbose = ApplicationSettings::getInstance()->getLoggingEnabled() &&
ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled() ? 1 : 0;
m_javaEnvironment->callStaticVoidMethod(
"io/coati/JavaIndexer",
"processFile",
@@ -84,7 +87,7 @@ void JavaParser::parseFile(const FilePath& filePath, std::shared_ptr<TextAccess>
filePath.str(),
fileContent,
classPath,
ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled() ? 1 : 0
verbose
);
}
}