chore: 增加一些加载时的日志打印

This commit is contained in:
MistEO
2023-01-13 15:16:18 +08:00
parent 821c822950
commit ec86c9c99b
4 changed files with 14 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ bool inited()
AsstBool AsstSetUserDir(const char* path)
{
auto os_path = asst::utils::path(path);
auto os_path = std::filesystem::absolute(asst::utils::path(path));
return asst::UserDir.set(os_path);
}
@@ -54,7 +54,7 @@ AsstBool AsstLoadResource(const char* path)
{
using namespace asst::utils::path_literals;
auto os_path = asst::utils::path(path);
auto os_path = std::filesystem::absolute(asst::utils::path(path));
auto res_path = os_path / "resource"_p;
if (asst::ResDir.empty()) {
asst::ResDir.set(res_path);

View File

@@ -7,6 +7,7 @@
bool asst::AvatarCacheManager::load(const std::filesystem::path& path)
{
LogTraceFunction;
Log.info("load", path);
m_path = path;

View File

@@ -29,13 +29,20 @@ static std::filesystem::path prepare_paddle_dir(const std::filesystem::path& dir
asst::OcrPack::OcrPack()
: m_ocr_option(std::make_unique<fastdeploy::RuntimeOption>()), m_det(nullptr), m_rec(nullptr), m_ocr(nullptr)
{
LogTraceFunction;
m_ocr_option->UseOrtBackend();
}
asst::OcrPack::~OcrPack() {}
asst::OcrPack::~OcrPack()
{
LogTraceFunction;
}
bool asst::OcrPack::load(const std::filesystem::path& path)
{
LogTraceFunction;
Log.info("load", path);
bool use_temp_dir = false;
auto paddle_dir = prepare_paddle_dir(path, &use_temp_dir);

View File

@@ -9,6 +9,9 @@ ASST_SUPPRESS_CV_WARNINGS_END
bool asst::TilePack::load(const std::filesystem::path& path)
{
LogTraceFunction;
Log.info("load", path);
if (!std::filesystem::exists(path)) {
return false;
}