From dea06db4064a70aad3e02e851a7705c2e9b5b24b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 7 Jun 2023 15:58:17 +0200 Subject: [PATCH] Reduce excessive logging Signed-off-by: Stefan Schmidt --- src/gui/socketapi/socketapi.cpp | 2 +- src/libsync/discovery.cpp | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index b657ecaa60f25..5fa55e16db220 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -366,7 +366,7 @@ void SocketApi::slotReadSocket() // Make sure to normalize the input from the socket to // make sure that the path will match, especially on OS X. const QString line = QString::fromUtf8(socket->readLine().trimmed()).normalized(QString::NormalizationForm_C); - qCInfo(lcSocketApi) << "Received SocketAPI message <--" << line << "from" << socket; + qCDebug(lcSocketApi) << "Received SocketAPI message <--" << line << "from" << socket; const int argPos = line.indexOf(QLatin1Char(':')); const QByteArray command = line.midRef(0, argPos).toUtf8().toUpper(); const int indexOfMethod = [&] { diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 75912f4db14d4..ad7b6d96cf9cf 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -73,7 +73,7 @@ ProcessDirectoryJob::ProcessDirectoryJob(DiscoveryPhase *data, PinState basePinS void ProcessDirectoryJob::start() { - qCInfo(lcDisco) << "STARTING" << _currentFolder._server << _queryServer << _currentFolder._local << _queryLocal; + qCDebug(lcDisco) << "STARTING" << _currentFolder._server << _queryServer << _currentFolder._local << _queryLocal; if (_queryServer == NormalQuery) { _serverJob = startAsyncServerQuery(); @@ -420,20 +420,20 @@ void ProcessDirectoryJob::processFile(PathTuple path, const char *hasLocal = localEntry.isValid() ? "true" : _queryLocal == ParentNotChanged ? "db" : "false"; const auto serverFileIsLocked = (serverEntry.isValid() ? (serverEntry.locked == SyncFileItem::LockStatus::LockedItem ? "locked" : "not locked") : ""); const auto localFileIsLocked = dbEntry._lockstate._locked ? "locked" : "not locked"; - qCInfo(lcDisco).nospace() << "Processing " << path._original - << " | (db/local/remote)" - << " | valid: " << dbEntry.isValid() << "/" << hasLocal << "/" << hasServer - << " | mtime: " << dbEntry._modtime << "/" << localEntry.modtime << "/" << serverEntry.modtime - << " | size: " << dbEntry._fileSize << "/" << localEntry.size << "/" << serverEntry.size - << " | etag: " << dbEntry._etag << "//" << serverEntry.etag - << " | checksum: " << dbEntry._checksumHeader << "//" << serverEntry.checksumHeader - << " | perm: " << dbEntry._remotePerm << "//" << serverEntry.remotePerm - << " | fileid: " << dbEntry._fileId << "//" << serverEntry.fileId - << " | inode: " << dbEntry._inode << "/" << localEntry.inode << "/" - << " | type: " << dbEntry._type << "/" << localEntry.type << "/" << (serverEntry.isDirectory ? ItemTypeDirectory : ItemTypeFile) - << " | e2ee: " << dbEntry.isE2eEncrypted() << "/" << serverEntry.isE2eEncrypted() - << " | e2eeMangledName: " << dbEntry.e2eMangledName() << "/" << serverEntry.e2eMangledName - << " | file lock: " << localFileIsLocked << "//" << serverFileIsLocked; + qCDebug(lcDisco).nospace() << "Processing " << path._original + << " | (db/local/remote)" + << " | valid: " << dbEntry.isValid() << "/" << hasLocal << "/" << hasServer + << " | mtime: " << dbEntry._modtime << "/" << localEntry.modtime << "/" << serverEntry.modtime + << " | size: " << dbEntry._fileSize << "/" << localEntry.size << "/" << serverEntry.size + << " | etag: " << dbEntry._etag << "//" << serverEntry.etag + << " | checksum: " << dbEntry._checksumHeader << "//" << serverEntry.checksumHeader + << " | perm: " << dbEntry._remotePerm << "//" << serverEntry.remotePerm + << " | fileid: " << dbEntry._fileId << "//" << serverEntry.fileId + << " | inode: " << dbEntry._inode << "/" << localEntry.inode << "/" + << " | type: " << dbEntry._type << "/" << localEntry.type << "/" << (serverEntry.isDirectory ? ItemTypeDirectory : ItemTypeFile) + << " | e2ee: " << dbEntry.isE2eEncrypted() << "/" << serverEntry.isE2eEncrypted() + << " | e2eeMangledName: " << dbEntry.e2eMangledName() << "/" << serverEntry.e2eMangledName + << " | file lock: " << localFileIsLocked << "//" << serverFileIsLocked; if (localEntry.isValid() && !serverEntry.isValid() @@ -1537,7 +1537,7 @@ void ProcessDirectoryJob::processFileFinalize( item->_direction = _dirItem->_direction; } - qCInfo(lcDisco) << "Discovered" << item->_file << item->_instruction << item->_direction << item->_type; + qCDebug(lcDisco) << "Discovered" << item->_file << item->_instruction << item->_direction << item->_type; if (item->isDirectory() && item->_instruction == CSYNC_INSTRUCTION_SYNC) item->_instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;