summaryrefslogtreecommitdiffstats
path: root/wsd/FileServer.cpp
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2020-01-21 11:55:32 +0000
committerMichael Meeks <michael.meeks@collabora.com>2020-01-21 14:39:21 +0100
commitaadf5af77b74822ebdc52e512b0b856957dc0896 (patch)
treec6d683c2aa6b83a3ca4fae4b13a288b60fa601c4 /wsd/FileServer.cpp
parentandroid: When the cell cursor moves, focus the document. (diff)
downloadonline-aadf5af77b74822ebdc52e512b0b856957dc0896.tar.gz
online-aadf5af77b74822ebdc52e512b0b856957dc0896.zip
reduce verbosity of FileServer trace logging.
Change-Id: I5a57e91742be504bcb2e51b45f6890420e52bb91 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87134 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'wsd/FileServer.cpp')
-rw-r--r--wsd/FileServer.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 95bd54f906..55942611e6 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()