diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-19 02:47:13 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-22 07:36:38 -0400 |
| commit | e071dfdfaa369a475a2d93df623c1696feee56ba (patch) | |
| tree | 4e3f1714558f6ac46f010b1cae561a96c1195c03 /src/shared/directoryentry.cpp | |
| parent | aae6d6a5aa8d6b101fcc38388222a8a6e7ee2ec6 (diff) | |
changed qCritical() to log::error()
removed now unused vlog()
Diffstat (limited to 'src/shared/directoryentry.cpp')
| -rw-r--r-- | src/shared/directoryentry.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp index 9d9edd85..2cdbac74 100644 --- a/src/shared/directoryentry.cpp +++ b/src/shared/directoryentry.cpp @@ -21,6 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "windows_error.h"
#include "leaktrace.h"
#include "error_report.h"
+#include <log.h>
#include <bsatk.h>
#include <boost/bind.hpp>
#include <boost/scoped_array.hpp>
@@ -35,6 +36,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. namespace MOShared {
+namespace log = MOBase::log;
+
static const int MAXPATH_UNICODE = 32767;
class OriginConnection {
@@ -103,7 +106,7 @@ public: m_OriginsNameMap.erase(iter);
m_OriginsNameMap[newName] = idx;
} else {
- vlog("failed to change name lookup from %ls to %ls", oldName.c_str(), newName.c_str());
+ log::error("failed to change name lookup from {} to {}", oldName, newName);
}
}
@@ -714,14 +717,14 @@ void DirectoryEntry::removeFile(FileEntry::Index index) if (iter != m_Files.end()) {
m_Files.erase(iter);
} else {
- vlog("file \"%ls\" not in directory \"%ls\"",
- m_FileRegister->getFile(index)->getName().c_str(),
- this->getName().c_str());
+ log::error(
+ "file \"{}\" not in directory \"{}\"",
+ m_FileRegister->getFile(index)->getName(), this->getName());
}
} else {
- vlog("file \"%ls\" not in directory \"%ls\", directory empty",
- m_FileRegister->getFile(index)->getName().c_str(),
- this->getName().c_str());
+ log::error(
+ "file \"{}\" not in directory \"{}\", directory empty",
+ m_FileRegister->getFile(index)->getName(), this->getName());
}
}
@@ -844,7 +847,7 @@ const FileEntry::Ptr DirectoryEntry::searchFile(const std::wstring &path, const DirectoryEntry *temp = findSubDirectory(pathComponent);
if (temp != nullptr) {
if (len >= path.size()) {
- vlog("unexpected end of path");
+ log::error("unexpected end of path");
return FileEntry::Ptr();
}
return temp->searchFile(path.substr(len + 1), directory);
@@ -988,7 +991,7 @@ bool FileRegister::removeFile(FileEntry::Index index) m_Files.erase(index);
return true;
} else {
- vlog("invalid file index for remove: %lu", index);
+ log::error("invalid file index for remove: {}", index);
return false;
}
}
@@ -1002,7 +1005,7 @@ void FileRegister::removeOrigin(FileEntry::Index index, int originID) m_Files.erase(iter);
}
} else {
- vlog("invalid file index for remove (for origin): %lu", index);
+ log::error("invalid file index for remove (for origin): {}", index);
}
}
|
