Mass: add logging indentation to refreshValues().
This commit is contained in:
parent
567546489f
commit
d1712bf8cb
1 changed files with 11 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <Corrade/Containers/Array.h>
|
#include <Corrade/Containers/Array.h>
|
||||||
#include <Corrade/Containers/Pair.h>
|
#include <Corrade/Containers/Pair.h>
|
||||||
|
#include <Corrade/Containers/ScopeGuard.h>
|
||||||
#include <Corrade/Utility/Path.h>
|
#include <Corrade/Utility/Path.h>
|
||||||
|
|
||||||
#include "PropertyNames.h"
|
#include "PropertyNames.h"
|
||||||
|
@ -78,6 +79,16 @@ auto Mass::getNameFromFile(Containers::StringView path) -> Containers::Optional<
|
||||||
void Mass::refreshValues() {
|
void Mass::refreshValues() {
|
||||||
LOG_INFO_FORMAT("Refreshing values for {}.", _filename);
|
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.");
|
LOG_INFO("Checking if file exists.");
|
||||||
if(!Utility::Path::exists(Utility::Path::join(_folder, _filename))) {
|
if(!Utility::Path::exists(Utility::Path::join(_folder, _filename))) {
|
||||||
LOG_WARNING_FORMAT("{} doesn't exist in {}.", _filename, _folder);
|
LOG_WARNING_FORMAT("{} doesn't exist in {}.", _filename, _folder);
|
||||||
|
|
Loading…
Reference in a new issue