From 6aad062e9a3e751c7430a6134353f53e3c7eb399 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 4 Jul 2020 01:50:29 -0500 Subject: [PATCH] Add logging [skip ci] --- common/shareddb.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 789b739a8..6507eaebc 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -917,6 +917,7 @@ bool SharedDatabase::LoadItems(const std::string &prefix) { EQ::IPCMutex mutex("items"); mutex.Lock(); std::string file_name = Config->SharedMemDir + prefix + std::string("items"); + LogInfo("[Shared Memory] Attempting to load file [{}]", file_name); items_mmf = std::unique_ptr(new EQ::MemoryMappedFile(file_name)); items_hash = std::unique_ptr>(new EQ::FixedMemoryHashSet(reinterpret_cast(items_mmf->Get()), items_mmf->Size())); mutex.Unlock(); @@ -1341,6 +1342,7 @@ bool SharedDatabase::LoadNPCFactionLists(const std::string &prefix) { EQ::IPCMutex mutex("faction"); mutex.Lock(); std::string file_name = Config->SharedMemDir + prefix + std::string("faction"); + LogInfo("[Shared Memory] Attempting to load file [{}]", file_name); faction_mmf = std::unique_ptr(new EQ::MemoryMappedFile(file_name)); faction_hash = std::unique_ptr>(new EQ::FixedMemoryHashSet(reinterpret_cast(faction_mmf->Get()), faction_mmf->Size())); mutex.Unlock(); @@ -1542,6 +1544,7 @@ bool SharedDatabase::LoadSkillCaps(const std::string &prefix) { EQ::IPCMutex mutex("skill_caps"); mutex.Lock(); std::string file_name = Config->SharedMemDir + prefix + std::string("skill_caps"); + LogInfo("[Shared Memory] Attempting to load file [{}]", file_name); skill_caps_mmf = std::unique_ptr(new EQ::MemoryMappedFile(file_name)); mutex.Unlock(); } catch(std::exception &ex) { @@ -1700,6 +1703,7 @@ bool SharedDatabase::LoadSpells(const std::string &prefix, int32 *records, const std::string file_name = Config->SharedMemDir + prefix + std::string("spells"); spells_mmf = std::unique_ptr(new EQ::MemoryMappedFile(file_name)); + LogInfo("[Shared Memory] Attempting to load file [{}]", file_name); *records = *reinterpret_cast(spells_mmf->Get()); *sp = reinterpret_cast((char*)spells_mmf->Get() + 4); mutex.Unlock();