fully hide some logs from release builds
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 9 Jun 2023 16:58:50 +0000 (18:58 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Mon, 12 Jun 2023 17:12:48 +0000 (17:12 +0000)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/csync/csync_exclude.cpp
src/libsync/discovery.cpp

index bddb3047e05f4b226287010e5604a9fff8d10c10..9efe50df39165d5c072c2f4067e8bf12903a859d 100644 (file)
@@ -442,7 +442,9 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const QString &path, Ite
             addExcludeFilePath(absolutePath);
             reloadExcludeFiles();
         } else {
+#if !defined QT_NO_DEBUG
             qWarning() << "System exclude list file could not be read:" << absolutePath;
+#endif
         }
     }
 
index 81e180934db0724fa17835055a960e25afd75181..2ed343bc1d136a5dd825e7d12f77d25faf45e1ba 100644 (file)
@@ -952,7 +952,9 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
             // Not modified locally (ParentNotChanged)
             if (noServerEntry) {
                 // not on the server: Removed on the server, delete locally
+#if !defined QT_NO_DEBUG
                 qCInfo(lcDisco) << "File" << item->_file << "is not anymore on server. Going to delete it locally.";
+#endif
                 item->_instruction = CSYNC_INSTRUCTION_REMOVE;
                 item->_direction = SyncFileItem::Down;
             } else if (dbEntry._type == ItemTypeVirtualFileDehydration) {
@@ -980,7 +982,9 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
         } else if (!serverModified) {
             // Removed locally: also remove on the server.
             if (!dbEntry._serverHasIgnoredFiles) {
+#if !defined QT_NO_DEBUG
                 qCInfo(lcDisco) << "File" << item->_file << "was deleted locally. Going to delete it on the server.";
+#endif
                 item->_instruction = CSYNC_INSTRUCTION_REMOVE;
                 item->_direction = SyncFileItem::Up;
             }
@@ -1019,7 +1023,9 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
         } else if (!typeChange && ((dbEntry._modtime == localEntry.modtime && dbEntry._fileSize == localEntry.size) || localEntry.isDirectory)) {
             // Local file unchanged.
             if (noServerEntry) {
+#if !defined QT_NO_DEBUG
                 qCInfo(lcDisco) << "File" << item->_file << "is not anymore on server. Going to delete it locally.";
+#endif
                 item->_instruction = CSYNC_INSTRUCTION_REMOVE;
                 item->_direction = SyncFileItem::Down;
             } else if (dbEntry._type == ItemTypeVirtualFileDehydration || localEntry.type == ItemTypeVirtualFileDehydration) {