comparison OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp @ 5374:b216b57bbe6a

more detailed logs
author Alain Mazy <am@osimis.io>
date Tue, 22 Aug 2023 12:30:05 +0200
parents 0ea402b4d901
children b83192e7ad10
comparison
equal deleted inserted replaced
5373:123a94dd57df 5374:b216b57bbe6a
120 void FilesystemStorage::Create(const std::string& uuid, 120 void FilesystemStorage::Create(const std::string& uuid,
121 const void* content, 121 const void* content,
122 size_t size, 122 size_t size,
123 FileContentType type) 123 FileContentType type)
124 { 124 {
125 LOG(INFO) << "Creating attachment \"" << uuid << "\" of \"" << GetDescriptionInternal(type) 125 if (size > (1024 * 1024))
126 << "\" type (size: " << (size / (1024 * 1024) + 1) << "MB)"; 126 {
127 LOG(INFO) << "Creating attachment \"" << uuid << "\" of \"" << GetDescriptionInternal(type)
128 << "\" type (size: " << (size / (1024 * 1024) + 1) << "MB)";
129 }
130 else
131 {
132 LOG(INFO) << "Creating attachment \"" << uuid << "\" of \"" << GetDescriptionInternal(type)
133 << "\" type (size: " << (size / 1024 + 1) << "KB)";
134 }
127 135
128 boost::filesystem::path path; 136 boost::filesystem::path path;
129 137
130 path = GetPath(uuid); 138 path = GetPath(uuid);
131 139