Skip to content

Commit 0ea720a

Browse files
committed
tweaked logging a bit
1 parent 9d52d16 commit 0ea720a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

loader_core/gw2al_api_addon_registry.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ gw2al_api_ret gw2al_core__load_addon(wchar_t * name)
147147
{
148148
if (gw2al_core__load_addon((wchar_t*)laddon.desc->dependList[i].name) != GW2AL_OK)
149149
{
150+
LOG_WARNING(L"core", L"Addon \"%s\" is not loaded due to missing dependency \"%s\"", name, laddon.desc->dependList[i].name);
150151
FreeLibrary(laddon.addonLib);
151152
return GW2AL_DEP_NOT_LOADED;
152153
}
@@ -156,6 +157,10 @@ gw2al_api_ret gw2al_core__load_addon(wchar_t * name)
156157

157158
if ((depDsc->majorVer < laddon.desc->dependList[i].majorVer) || (depDsc->minorVer < laddon.desc->dependList[i].minorVer))
158159
{
160+
LOG_WARNING(L"core", L"Addon \"%s\" is not loaded due to wrong dependency version \"%s\". Require v%u.%u(r%u) but have v%u.%u(r%u)", name, laddon.desc->dependList[i].name,
161+
laddon.desc->dependList[i].majorVer, laddon.desc->dependList[i].minorVer, laddon.desc->dependList[i].revision,
162+
depDsc->majorVer, depDsc->minorVer, depDsc->revision
163+
);
159164
FreeLibrary(laddon.addonLib);
160165
return GW2AL_DEP_OUTDATED;
161166
}
@@ -177,6 +182,8 @@ gw2al_api_ret gw2al_core__load_addon(wchar_t * name)
177182
*addon = laddon;
178183

179184
addonStorage.register_obj(addon, nameH);
185+
186+
LOG_INFO(L"core", L"Loaded %s v%u.%u r%u", laddon.desc->name, laddon.desc->majorVer, laddon.desc->minorVer, laddon.desc->revision);
180187

181188
return ret;
182189
}

loader_core/loader_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void loader_core::LoadAddonsFromDir(const wchar_t * dir)
5757
LOG_ERROR(L"core", L"%s/%s/gw2addon_%s.dll dependency outdated", dir, fdFile.cFileName, fdFile.cFileName);
5858
break;
5959
case GW2AL_OK:
60-
LOG_INFO(L"core", L"%s/%s/gw2addon_%s.dll loaded", dir, fdFile.cFileName, fdFile.cFileName);
60+
;// LOG_INFO(L"core", L"%s/%s/gw2addon_%s.dll loaded", dir, fdFile.cFileName, fdFile.cFileName);
6161
break;
6262
default:
6363
LOG_ERROR(L"core", L"Error %u loading %s/%s/gw2addon_%s.dll", ret, dir, fdFile.cFileName, fdFile.cFileName);

0 commit comments

Comments
 (0)