diff --git a/src/app/main.cpp b/src/app/main.cpp
index a95bfb4d..59f3e28c 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -215,7 +215,7 @@ int main(int argc, char *argv[])
""
"
First of all we need to figure out which of these files caused the crash. Please go ahead and create copy of your project. "
"Remove everything except the files mentioned above from the Project Paths. "
- "Set your indexer thread count to 1, force-refresh the project and wait for the crash to reoccur.
"
+ "Set the indexer thread count in the preferences to 1, force-refresh the project and wait for the crash to reoccur."
);
}
else
@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
"" + storedIndexingFiles.front().str() + "" +
""
"To find out which part of the file caused the crash, please make sure to remove everything except this source file from your Project Paths. "
- "Enable the option \"Enable Verbose Indexer Logging\" in your log window (this really slows down indexing performance) and force-refresh the project.
"
+ "Enable the option \"Indexer Logging\" in your preferences (this really slows down indexing performance) and force-refresh the project."
"After the expected crash reoccurred please open the respective log file which now contains the portion of the abstract syntax tree that Coati managed to index, "
"including the node where the crash occurred. We hope that this information helps you figure out what caused the crash and tell us what we can do to reproduce it.
"
);
diff --git a/src/lib/component/ComponentManager.cpp b/src/lib/component/ComponentManager.cpp
index 51cf57fc..7bae90c4 100644
--- a/src/lib/component/ComponentManager.cpp
+++ b/src/lib/component/ComponentManager.cpp
@@ -57,11 +57,11 @@ void ComponentManager::setup(ViewLayout* viewLayout)
m_dialogView = m_componentFactory->getViewFactory()->createDialogView(viewLayout, m_componentFactory->getStorageAccess());
std::shared_ptr tabbedView =
- m_componentFactory->getViewFactory()->createTabbedView(viewLayout, "Log/Error");
+ m_componentFactory->getViewFactory()->createTabbedView(viewLayout, "Log");
m_tabbedViews.push_back(tabbedView);
- std::shared_ptr logComponent = m_componentFactory->createLogComponent(tabbedView.get());
- m_components.push_back(logComponent);
+ // std::shared_ptr logComponent = m_componentFactory->createLogComponent(tabbedView.get());
+ // m_components.push_back(logComponent);
std::shared_ptr errorComponent = m_componentFactory->createErrorComponent(tabbedView.get());
m_components.push_back(errorComponent);
diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp
index ec58218b..21cb45b3 100644
--- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp
+++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.cpp
@@ -57,6 +57,15 @@ void QtProjectWizzardContentPreferences::populate(QGridLayout* layout, int& row)
}
connect(m_colorSchemes, SIGNAL(activated(int)), this, SLOT(colorSchemeChanged(int)));
+ // logging
+ m_loggingEnabled = addCheckBox("Logging", "Enable console and file logging",
+ "Save log files and show log information in the console.", layout, row);
+ connect(m_loggingEnabled, SIGNAL(clicked()), this, SLOT(loggingEnabledChanged()));
+
+ m_verboseIndexerLoggingEnabled = addCheckBox("Indexer Logging", "Enable verbose indexer logging",
+ "Logs information of abstract syntax tree traversal during indexing. This information can help us "
+ "reproduce crashes in indexing.\n\nThis slows down indexing performance a lot.", layout, row);
+
addGap(layout, row);
// Controls
@@ -164,6 +173,10 @@ void QtProjectWizzardContentPreferences::load()
}
}
+ m_loggingEnabled->setChecked(appSettings->getLoggingEnabled());
+ m_verboseIndexerLoggingEnabled->setChecked(appSettings->getVerboseIndexerLoggingEnabled());
+ m_verboseIndexerLoggingEnabled->setEnabled(m_loggingEnabled->isChecked());
+
m_scrollSpeed->setText(QString::number(appSettings->getScrollSpeed(), 'f', 1));
m_graphZooming->setChecked(appSettings->getControlsGraphZoomOnMouseWheel());
@@ -192,6 +205,9 @@ void QtProjectWizzardContentPreferences::save()
appSettings->setColorSchemePath(m_colorSchemePaths[m_colorSchemes->currentIndex()]);
m_oldColorSchemeIndex = -1;
+ appSettings->setLoggingEnabled(m_loggingEnabled->isChecked());
+ appSettings->setVerboseIndexerLoggingEnabled(m_verboseIndexerLoggingEnabled->isChecked());
+
float scrollSpeed = m_scrollSpeed->text().toFloat();
if (scrollSpeed) appSettings->setScrollSpeed(scrollSpeed);
@@ -234,6 +250,11 @@ void QtProjectWizzardContentPreferences::javaPathDetectionClicked()
}
}
+void QtProjectWizzardContentPreferences::loggingEnabledChanged()
+{
+ m_verboseIndexerLoggingEnabled->setEnabled(m_loggingEnabled->isChecked());
+}
+
void QtProjectWizzardContentPreferences::addJavaPathDetection(QGridLayout* layout, int& row)
{
std::vector detectorNames = m_javaPathDetector->getWorkingDetectorNames();
diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h
index c4904914..9a6482d3 100644
--- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h
+++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPreferences.h
@@ -29,6 +29,7 @@ public:
private slots:
void colorSchemeChanged(int index);
void javaPathDetectionClicked();
+ void loggingEnabledChanged();
private:
void addJavaPathDetection(QGridLayout* layout, int& row);
@@ -49,6 +50,8 @@ private:
QComboBox* m_colorSchemes;
std::vector m_colorSchemePaths;
int m_oldColorSchemeIndex;
+ QCheckBox* m_loggingEnabled;
+ QCheckBox* m_verboseIndexerLoggingEnabled;
QLineEdit* m_scrollSpeed;
QCheckBox* m_graphZooming;