mirror of
https://github.com/LibreOffice/online.git
synced 2025-07-29 12:01:08 +00:00
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>
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user