mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-18 08:22:06 +03:00
Revert "Removed warning and error logging level in GUI #4745"
This reverts commit 756000d8a9
.
Conflicts:
src/gui/res/SettingsDialogBase.ui
src/gui/src/AppConfig.cpp
src/gui/src/MainWindow.cpp
This commit is contained in:
parent
c89dc68cd7
commit
d8582d1093
@ -208,6 +208,21 @@
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="m_pComboLogLevel">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Error</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Warning</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Note</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Info</string>
|
||||
|
@ -37,6 +37,9 @@ const char AppConfig::m_SynergyLogDir[] = "/var/log/";
|
||||
|
||||
static const char* logLevelNames[] =
|
||||
{
|
||||
"ERROR",
|
||||
"WARNING",
|
||||
"NOTE",
|
||||
"INFO",
|
||||
"DEBUG",
|
||||
"DEBUG1",
|
||||
@ -55,8 +58,7 @@ AppConfig::AppConfig(QSettings* settings) :
|
||||
m_ElevateMode(false),
|
||||
m_AutoConfigPrompted(false),
|
||||
m_CryptoEnabled(false),
|
||||
m_AutoHide(false),
|
||||
m_ResetLogLevel(true)
|
||||
m_AutoHide(false)
|
||||
{
|
||||
Q_ASSERT(m_pSettings);
|
||||
|
||||
@ -116,7 +118,7 @@ void AppConfig::loadSettings()
|
||||
m_ScreenName = settings().value("screenName", QHostInfo::localHostName()).toString();
|
||||
m_Port = settings().value("port", 24800).toInt();
|
||||
m_Interface = settings().value("interface").toString();
|
||||
m_LogLevel = settings().value("logLevel", 0).toInt(); // level 0: INFO
|
||||
m_LogLevel = settings().value("logLevel", 3).toInt(); // level 3: INFO
|
||||
m_LogToFile = settings().value("logToFile", false).toBool();
|
||||
m_LogFilename = settings().value("logFilename", synergyLogDir() + "synergy.log").toString();
|
||||
m_WizardLastRun = settings().value("wizardLastRun", 0).toInt();
|
||||
@ -130,12 +132,6 @@ void AppConfig::loadSettings()
|
||||
m_UserToken = settings().value("userToken", "").toString();
|
||||
m_CryptoEnabled = settings().value("cryptoEnabled", false).toBool();
|
||||
m_AutoHide = settings().value("autoHide", false).toBool();
|
||||
m_ResetLogLevel = settings().value("resetLogLevel", true).toBool();
|
||||
|
||||
if (m_ResetLogLevel) {
|
||||
m_LogLevel = 0;
|
||||
m_ResetLogLevel = false;
|
||||
}
|
||||
}
|
||||
|
||||
void AppConfig::saveSettings()
|
||||
@ -157,7 +153,6 @@ void AppConfig::saveSettings()
|
||||
settings().setValue("userToken", m_UserToken);
|
||||
settings().setValue("cryptoEnabled", m_CryptoEnabled);
|
||||
settings().setValue("autoHide", m_AutoHide);
|
||||
settings().setValue("resetLogLevel", m_ResetLogLevel);
|
||||
}
|
||||
|
||||
void AppConfig::setAutoConfig(bool autoConfig)
|
||||
|
@ -128,7 +128,6 @@ class AppConfig
|
||||
QString m_UserToken;
|
||||
bool m_CryptoEnabled;
|
||||
bool m_AutoHide;
|
||||
bool m_ResetLogLevel;
|
||||
|
||||
static const char m_SynergysName[];
|
||||
static const char m_SynergycName[];
|
||||
|
@ -374,7 +374,7 @@ void MainWindow::appendLogInfo(const QString& text)
|
||||
}
|
||||
|
||||
void MainWindow::appendLogDebug(const QString& text) {
|
||||
if (appConfig().logLevel() >= 1) {
|
||||
if (appConfig().logLevel() >= 4) {
|
||||
appendLogRaw(getTimeStamp() + " DEBUG: " + text);
|
||||
}
|
||||
}
|
||||
@ -587,7 +587,7 @@ void MainWindow::startSynergy()
|
||||
qDebug() << args;
|
||||
|
||||
// show command if debug log level...
|
||||
if (appConfig().logLevel() >= 1) {
|
||||
if (appConfig().logLevel() >= 4) {
|
||||
appendLogInfo(QString("command: %1 %2").arg(app, args.join(" ")));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user