Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.9] Bugfix/log less verbose #5775

Merged
merged 3 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gui/application.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ protected slots:
QString _logDir;
int _logExpire = 0;
bool _logFlush = false;
bool _logDebug = true;
bool _logDebug = false;
bool _userTriggeredConnect = false;
bool _debugMode = false;
bool _backgroundMode = false;
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ void ConfigFile::setLogDir(const QString &dir)
bool ConfigFile::logDebug() const
{
QSettings settings(configFile(), QSettings::IniFormat);
return settings.value(QLatin1String(logDebugC), true).toBool();
return settings.value(QLatin1String(logDebugC), false).toBool();
}

void ConfigFile::setLogDebug(bool enabled)
Expand Down
5 changes: 1 addition & 4 deletions src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
namespace {

constexpr int CrashLogSize = 20;
constexpr int MaxLogSizeBytes = 1024 * 512;
constexpr int MaxLogSizeBytes = 1024 * 1024 * 3;

static bool compressLog(const QString &originalName, const QString &targetName)
{
Expand Down Expand Up @@ -142,9 +142,6 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString
msgW.append(L"\n");
OutputDebugString(msgW.c_str());
}
#elif defined(QT_DEBUG)
QTextStream cout(stdout, QIODevice::WriteOnly);
cout << msg << endl;
#endif
{
QMutexLocker lock(&_mutex);
Expand Down