Mass: add logging indentation to refreshValues().

This commit is contained in:
Guillaume Jacquemin 2022-11-25 09:43:11 +01:00
parent 567546489f
commit d1712bf8cb
1 changed files with 11 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Pair.h>
#include <Corrade/Containers/ScopeGuard.h>
#include <Corrade/Utility/Path.h>
#include "PropertyNames.h"
@ -78,6 +79,16 @@ auto Mass::getNameFromFile(Containers::StringView path) -> Containers::Optional<
void Mass::refreshValues() {
LOG_INFO_FORMAT("Refreshing values for {}.", _filename);
logger().lockMutex();
logger().indent();
logger().unlockMutex();
Containers::ScopeGuard indent_guard{[]{
logger().lockMutex();
logger().unindent();
logger().unlockMutex();
}};
LOG_INFO("Checking if file exists.");
if(!Utility::Path::exists(Utility::Path::join(_folder, _filename))) {
LOG_WARNING_FORMAT("{} doesn't exist in {}.", _filename, _folder);