[Performance] Reworked how all log calls are made in the source, see changelog.txt for more details

This commit is contained in:
Akkadius
2017-04-01 03:51:46 -05:00
parent 93a6efa95f
commit 7aa1d243b0
131 changed files with 3126 additions and 3066 deletions
+4 -4
View File
@@ -49,11 +49,11 @@ bool BotDatabase::Connect(const char* host, const char* user, const char* passwd
uint32 errnum = 0;
char errbuf[MYSQL_ERRMSG_SIZE];
if (!Open(host, user, passwd, database, port, &errnum, errbuf)) {
Log.Out(Logs::General, Logs::Error, "Failed to connect to bot database: Error: %s", errbuf);
Log(Logs::General, Logs::Error, "Failed to connect to bot database: Error: %s", errbuf);
return false;
}
else {
Log.Out(Logs::General, Logs::Status, "Using bot database '%s' at %s:%d", database, host, port);
Log(Logs::General, Logs::Status, "Using bot database '%s' at %s:%d", database, host, port);
return true;
}
}
@@ -1143,7 +1143,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent
(uint32)atoul(row[14])
);
if (!item_inst) {
Log.Out(Logs::General, Logs::Error, "Warning: bot_id '%i' has an invalid item_id '%i' in inventory slot '%i'", bot_id, item_id, slot_id);
Log(Logs::General, Logs::Error, "Warning: bot_id '%i' has an invalid item_id '%i' in inventory slot '%i'", bot_id, item_id, slot_id);
continue;
}
@@ -1196,7 +1196,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent
item_inst->SetOrnamentHeroModel((uint32)atoul(row[8]));
if (inventory_inst.PutItem(slot_id, *item_inst) == INVALID_INDEX)
Log.Out(Logs::General, Logs::Error, "Warning: Invalid slot_id for item in inventory: bot_id = '%i', item_id = '%i', slot_id = '%i'", bot_id, item_id, slot_id);
Log(Logs::General, Logs::Error, "Warning: Invalid slot_id for item in inventory: bot_id = '%i', item_id = '%i', slot_id = '%i'", bot_id, item_id, slot_id);
safe_delete(item_inst);
}