logic: log the first 20.000 characters of clang invocations if verbose indexer logging is disabled

This commit is contained in:
mlangkabel
2018-12-14 17:56:33 +01:00
parent 92f4a9e056
commit 111e8a5588
+3 -4
View File
@@ -193,10 +193,9 @@ void CxxParser::runTool(clang::tooling::CompilationDatabase* compilationDatabase
if (LogManager::getInstance()->getLoggingEnabled())
{
const ClangInvocationInfo info = getClangInvocationString(compilationDatabase);
if (ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled())
{
LOG_INFO("Clang Invocation: " + info.invocation);
}
LOG_INFO("Clang Invocation: " + info.invocation.substr(0, ApplicationSettings::getInstance()->getVerboseIndexerLoggingEnabled() ? std::string::npos : 20000));
if (!info.errors.empty())
{
LOG_INFO("Clang Invocation errors: " + info.errors);