perf: 优化日志输出控制

This commit is contained in:
uye
2024-06-27 00:41:38 +08:00
parent 9ad82247db
commit f6f458a660
6 changed files with 26 additions and 45 deletions

View File

@@ -3,7 +3,6 @@
#include <meojson/json.hpp>
#include "Utils/Demangle.hpp"
#include "Utils/LogControl.hpp"
#include "Utils/Logger.hpp"
bool asst::AbstractConfig::load(const std::filesystem::path& path)
@@ -16,9 +15,7 @@ bool asst::AbstractConfig::load(const std::filesystem::path& path)
}
m_path = path;
if (LogControl::is_enabled()) {
LogTraceScope(class_name + " :: " + __FUNCTION__);
}
LogTraceScope(class_name + " :: " + __FUNCTION__);
auto ret = json::open(path, true);
if (!ret) {