[Libreoffice-commits] online.git: wsd/FileServer.cpp

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 21 13:39:41 UTC 2020


 wsd/FileServer.cpp |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit aadf5af77b74822ebdc52e512b0b856957dc0896
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Tue Jan 21 11:55:32 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Jan 21 14:39:21 2020 +0100

    reduce verbosity of FileServer trace logging.
    
    Change-Id: I5a57e91742be504bcb2e51b45f6890420e52bb91
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87134
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 95bd54f90..55942611e 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -474,12 +474,14 @@ void FileServerRequestHandler::readDirToHash(const std::string &basePath, const
     struct stat fileStat;
     DIR *workingdir;
 
-    LOG_TRC("Pre-reading directory: " << basePath << path);
     workingdir = opendir((basePath + path).c_str());
 
     if (!workingdir)
         return;
 
+    size_t fileCount = 0;
+    std::string filesRead;
+
     while ((currentFile = readdir(workingdir)) != nullptr)
     {
         if (currentFile->d_name[0] == '.')
@@ -493,7 +495,9 @@ void FileServerRequestHandler::readDirToHash(const std::string &basePath, const
 
         else if (S_ISREG(fileStat.st_mode))
         {
-            LOG_TRC("Reading file: '" << basePath << relPath << " as '" << relPath << "'");
+            fileCount++;
+            filesRead.append(currentFile->d_name);
+            filesRead.append(" ");
 
             std::ifstream file(basePath + relPath, std::ios::binary);
 
@@ -539,6 +543,9 @@ void FileServerRequestHandler::readDirToHash(const std::string &basePath, const
         }
     }
     closedir(workingdir);
+
+    if (fileCount > 0)
+        LOG_TRC("Pre-read " << fileCount << " file(s) from directory: " << basePath << path << ": " << filesRead);
 }
 
 void FileServerRequestHandler::initialize()


More information about the Libreoffice-commits mailing list