Jump to content

Startup log readability improvement


Guest begemot
 Share

Recommended Posts

For master branch.

Commit: de76ec75bf63bd2e4592cb8e4f8cb9ca155c8598

Change startup log readability.

Change startup log to correspond to version of commit 57ab444e63c61b7a18eeef2896961932a736dd45.

Add some missing log loading bars.

How can I attach files to thread ?

Patch text.

diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp

index 140aa78..4fa4121 100644

--- a/src/game/GameEventMgr.cpp

+++ b/src/game/GameEventMgr.cpp

@@ -95,7 +95,7 @@ void GameEventMgr::LoadFromDB()

QueryResult *result = WorldDatabase.Query("SELECT MAX(entry) FROM game_event");

if( !result )

{

- sLog.outString(">> Table game_event is empty.");

+ sLog.outString(">> Table game_event is empty!");

sLog.outString();

return;

}

diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp

index 2db0c49..7d76e05 100644

--- a/src/game/InstanceSaveMgr.cpp

+++ b/src/game/InstanceSaveMgr.cpp

@@ -342,30 +342,28 @@ void InstanceSaveManager::PackInstances()

delete result;

}

- barGoLink bar( InstanceSet.size() + 1);

- bar.step();

-

uint32 InstanceNumber = 1;

- // we do assume std::set is sorted properly on integer value

- for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i)

- {

- if (*i != InstanceNumber)

- {

- // remap instance id

- WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

- WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

- CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

- CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

- CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i);

- CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

- }

-

- ++InstanceNumber;

- bar.step();

- }

-

+ if (!(InstanceSet.size())) {

+ barGoLink bar(1);

+ bar.step();

+ } else {

+ barGoLink bar(InstanceSet.size());

+ // we do assume std::set is sorted properly on integer value

+ for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i) {

+ if (*i != InstanceNumber) {

+ // remap instance id

+ WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

+ WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

+ CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

+ CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

+ CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i);

+ CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);

+ }

+ ++InstanceNumber;

+ bar.step();

+ }

+ }

sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber );

- sLog.outString();

}

void InstanceSaveManager::LoadResetTimes()

diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp

index 44c6cab..3699598 100644

--- a/src/game/PoolHandler.cpp

+++ b/src/game/PoolHandler.cpp

@@ -378,25 +378,20 @@ void PoolHandler::LoadFromDB()

}

uint32 count = 0;

-

- barGoLink bar(result->GetRowCount());

- do

- {

- ++count;

- Field *fields = result->Fetch();

-

- bar.step();

-

- uint16 pool_id = fields[0].GetUInt16();

-

- PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id];

- pPoolTemplate.MaxLimit = fields[1].GetUInt32();

-

- } while (result->NextRow());

-

- sLog.outString();

- sLog.outString( ">> Loaded %u objects pools", count );

- delete result;

+ {

+ barGoLink bar(result->GetRowCount());

+ do {

+ ++count;

+ Field *fields = result->Fetch();

+ bar.step();

+ uint16 pool_id = fields[0].GetUInt16();

+ PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id];

+ pPoolTemplate.MaxLimit = fields[1].GetUInt32();

+ } while (result->NextRow());

+ sLog.outString();

+ sLog.outString(">> Loaded %u objects pools", count);

+ delete result;

+ }

// Creatures

@@ -412,7 +407,7 @@ void PoolHandler::LoadFromDB()

bar2.step();

sLog.outString();

- sLog.outString(">> Loaded %u creatures in pools", count );

+ sLog.outString(">> Loaded 0 creatures in pools" );

}

else

{

@@ -540,8 +535,8 @@ void PoolHandler::LoadFromDB()

barGoLink bar2(1);

bar2.step();

- sLog.outString();

- sLog.outString(">> Loaded %u pools in pools", count );

+ sLog.outString();

+ sLog.outString(">> Loaded %u pools in mother pools", count);

}

else

{

@@ -612,9 +607,9 @@ void PoolHandler::LoadFromDB()

}

}

}

- sLog.outString();

- sLog.outString( ">> Loaded %u pools in mother pools", count );

delete result;

+ sLog.outString();

+ sLog.outString(">> Loaded %u pools in mother pools", count);

}

}

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp

index 75e07ff..ce9fb92 100644

--- a/src/game/SpellMgr.cpp

+++ b/src/game/SpellMgr.cpp

@@ -2356,8 +2356,11 @@ void SpellMgr::LoadPetLevelupSpellMap()

uint32 count = 0;

uint32 family_count = 0;

+ barGoLink bar(sCreatureFamilyStore.GetNumRows());

+

for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i)

{

+ bar.step();

CreatureFamilyEntry const *creatureFamily = sCreatureFamilyStore.LookupEntry(i);

if(!creatureFamily) // not exist

continue;

@@ -2387,7 +2390,6 @@ void SpellMgr::LoadPetLevelupSpellMap()

count++;

}

}

-

sLog.outString();

sLog.outString( ">> Loaded %u pet levelup and default spells for %u families", count, family_count );

}

@@ -2512,8 +2514,10 @@ void SpellMgr::LoadPetDefaultSpells()

}

}

}

+ barGoLink bar(1);

+ bar.step();

- sLog.outString();

+ sLog.outString();

sLog.outString( ">> Loaded addition spells for %u pet spell data entries and %u summonable creature templates", countData, countCreature );

}

diff --git a/src/game/World.cpp b/src/game/World.cpp

index 8efd7bf..7538de0 100644

--- a/src/game/World.cpp

+++ b/src/game/World.cpp

@@ -1078,13 +1078,13 @@ void World::LoadConfigSettings(bool reload)

if(reload)

{

- if(dataPath!=m_dataPath)

- sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).",m_dataPath.c_str());

+ if(dataPath != m_dataPath)

+ sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).", m_dataPath.c_str());

}

else

{

m_dataPath = dataPath;

- sLog.outString("Using DataDir %s",m_dataPath.c_str());

+ sLog.outString("Using DataDir: \\t\\t%s", m_dataPath.c_str());

}

bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", false);

@@ -1095,9 +1095,11 @@ void World::LoadConfigSettings(bool reload)

VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight);

VMAP::VMapFactory::createOrGetVMapManager()->preventMapsFromBeingUsed(ignoreMapIds.c_str());

VMAP::VMapFactory::PreventSpellsFromBeingTestedForLoS(ignoreSpellIds.c_str());

- sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight);

- sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str());

- sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");

+ sLog.outString("VMap support included.");

+ sLog.outString("LineOfSight: \\t\\t%i", enableLOS);

+ sLog.outString("getHeight: \\t\\t%i", enableHeight);

+ sLog.outString("VMap data directory is: \\t\\t%svmaps", m_dataPath.c_str());

+ sLog.outString("VMap config keys are: \\t\\tvmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");

}

/// Initialize the World

@@ -1269,8 +1271,11 @@ void World::SetInitialWorldSettings()

sLog.outString( "Loading Gameobject Respawn Data..." ); // must be after PackInstances()

objmgr.LoadGameobjectRespawnTimes();

- sLog.outString( "Loading Objects Pooling Data...");

+ sLog.outString( "Loading Pooling Data...");

+ sLog.outString();

poolhandler.LoadFromDB();

+ sLog.outString( ">>> Pooling Data loaded");

+ sLog.outString();

sLog.outString( "Loading Game Event Data...");

sLog.outString();

@@ -1558,8 +1563,9 @@ void World::DetectDBCLang()

}

m_defaultDbcLocale = LocaleConstant(default_locale);

-

- sLog.outString("Using %s DBC Locale as default. All available DBC locales: %s",localeNames[m_defaultDbcLocale],availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());

+ const char *available_locales = availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str();

+ sLog.outString("Default DBC Locale: \\t\\t%s", localeNames[m_defaultDbcLocale]);

+ sLog.outString("Available DBC locales: \\t\\t%s", available_locales);

sLog.outString();

}

diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp

index 24c372b..eb5d0ef 100644

--- a/src/mangosd/Main.cpp

+++ b/src/mangosd/Main.cpp

@@ -158,9 +158,9 @@ extern int main(int argc, char **argv)

sLog.outTitle( " MM MMM http://getmangos.eu");

sLog.outTitle( " MMMMMM\\n\\n");

- sLog.outString("Using configuration file %s.", cfg_file);

+ sLog.outString("Configuration file: \\t\\t%s.", cfg_file);

- sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));

+ sLog.outDetail("SSL info: \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));

if (SSLeay() < 0x009080bfL )

{

sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!");

diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp

index 56dd504..8c90da5 100644

--- a/src/mangosd/Master.cpp

+++ b/src/mangosd/Master.cpp

@@ -404,7 +404,7 @@ bool Master::_StartDB()

sLog.outError("Database not specified in configuration file");

return false;

}

- sLog.outString("World Database: %s", dbstring.c_str());

+ sLog.outString("World Database: \\t\\t%s", dbstring.c_str());

///- Initialise the world database

if(!WorldDatabase.Initialize(dbstring.c_str()))

@@ -422,7 +422,7 @@ bool Master::_StartDB()

sLog.outError("Character Database not specified in configuration file");

return false;

}

- sLog.outString("Character Database: %s", dbstring.c_str());

+ sLog.outString("Character Database: \\t\\t%s", dbstring.c_str());

///- Initialise the Character database

if(!CharacterDatabase.Initialize(dbstring.c_str()))

@@ -443,7 +443,7 @@ bool Master::_StartDB()

}

///- Initialise the login database

- sLog.outString("Login Database: %s", dbstring.c_str() );

+ sLog.outString("Login Database: \\t\\t%s", dbstring.c_str());

if(!loginDatabase.Initialize(dbstring.c_str()))

{

sLog.outError("Cannot connect to login database %s",dbstring.c_str());

@@ -461,15 +461,15 @@ bool Master::_StartDB()

return false;

}

- sLog.outString("Realm running as realm ID %d", realmID);

+ sLog.outString("Running realm ID: \\t\\t%d", realmID);

///- Clean the database before starting

clearOnlineAccounts();

sWorld.LoadDBVersion();

- sLog.outString("Using World DB: %s", sWorld.GetDBVersion());

- sLog.outString("Using creature EventAI: %s", sWorld.GetCreatureEventAIVersion());

+ sLog.outString("Using World DB version: \\t\\t%s", sWorld.GetDBVersion());

+ sLog.outString("Using creature EventAI: \\t\\t%s", sWorld.GetCreatureEventAIVersion());

return true;

}

diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp

index 13fdc57..b982abb 100644

--- a/src/realmd/Main.cpp

+++ b/src/realmd/Main.cpp

@@ -149,7 +149,7 @@ extern int main(int argc, char **argv)

sLog.outString( "%s [realm-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) );

sLog.outString( "<Ctrl-C> to stop.\\n" );

- sLog.outString("Using configuration file %s.", cfg_file);

+ sLog.outString("Configuration file: \\t\\t%s.", cfg_file);

///- Check the version of the configuration file

uint32 confVersion = sConfig.GetIntDefault("ConfVersion", 0);

@@ -165,7 +165,7 @@ extern int main(int argc, char **argv)

while (pause > clock()) {}

}

- sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));

+ sLog.outDetail("SSL info: \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));

if (SSLeay() < 0x009080bfL )

{

sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!");

@@ -320,8 +320,8 @@ bool StartDB()

return false;

}

- sLog.outString("Database: %s", dbstring.c_str() );

- if(!loginDatabase.Initialize(dbstring.c_str()))

+ sLog.outString("Login Database: \\t\\t%s", dbstring.c_str());

+ if (!loginDatabase.Initialize(dbstring.c_str()))

{

sLog.outError("Cannot connect to database");

return false;

diff --git a/src/realmd/RealmList.cpp b/src/realmd/RealmList.cpp

index 1bb0a97..73ff2f5 100644

--- a/src/realmd/RealmList.cpp

+++ b/src/realmd/RealmList.cpp

@@ -75,25 +75,20 @@ void RealmList::UpdateIfNeed()

UpdateRealms(false);

}

-void RealmList::UpdateRealms(bool init)

-{

- sLog.outDetail("Updating Realm List...");

-

+void RealmList::UpdateRealms(bool init) {

+ sLog.outString("Updating List of Realms...");

QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population FROM realmlist WHERE color <> 3 ORDER BY name" );

///- Circle through results and add them to the realm map

- if(result)

- {

- do

- {

- Field *fields = result->Fetch();

-

+ if (result) {

+ do {

+ Field *fields = result->Fetch();

uint8 allowedSecurityLevel = fields[7].GetUInt8();

-

- UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(),fields[2].GetCppString(),fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat() );

- if(init)

- sLog.outString("Added realm \\"%s\\".", fields[1].GetString());

- } while( result->NextRow() );

+ UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(), fields[2].GetCppString(), fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat());

+ if (init) {

+ sLog.outString("\\tAdded realm \\"%s\\" on host %s:%s.", fields[1].GetString(), fields[2].GetString(), fields[3].GetString());

+ }

+ } while (result->NextRow());

delete result;

}

}

diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp

index 9696172..31c800f 100644

--- a/src/shared/Database/DatabaseMysql.cpp

+++ b/src/shared/Database/DatabaseMysql.cpp

@@ -141,10 +141,9 @@ bool DatabaseMysql::Initialize(const char *infoString)

if (mMysql)

{

- sLog.outDetail( "Connected to MySQL database at %s",

- host.c_str());

- sLog.outString( "MySQL client library: %s", mysql_get_client_info());

- sLog.outString( "MySQL server ver: %s ", mysql_get_server_info( mMysql));

+ sLog.outDetail( "\\tConnected to MySQL DB at:\\t%s:%u", host.c_str(), port);

+ sLog.outString( "\\tMySQL client library: \\t%s", mysql_get_client_info());

+ sLog.outString( "\\tMySQL server ver: \\t%s", mysql_get_server_info( mMysql));

/*----------SET AUTOCOMMIT ON---------*/

// It seems mysql 5.0.x have enabled this feature

@@ -155,9 +154,9 @@ bool DatabaseMysql::Initialize(const char *infoString)

// autocommit is turned of during it.

// Setting it to on makes atomic updates work

if (!mysql_autocommit(mMysql, 1))

- sLog.outDetail("AUTOCOMMIT SUCCESSFULLY SET TO 1");

+ sLog.outDetail("\\tAUTOCOMMIT SUCCESSFULLY SET TO 1");

else

- sLog.outDetail("AUTOCOMMIT NOT SET TO 1");

+ sLog.outDetail("\\tAUTOCOMMIT NOT SET TO 1");

/*-------------------------------------*/

// set connection properties to UTF8 to properly handle locales for different

Link to comment
Share on other sites

diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp
index 140aa78..4fa4121 100644
--- a/src/game/GameEventMgr.cpp
+++ b/src/game/GameEventMgr.cpp
@@ -95,7 +95,7 @@ void GameEventMgr::LoadFromDB()
        QueryResult *result = WorldDatabase.Query("SELECT MAX(entry) FROM game_event");
        if( !result )
        {
-            sLog.outString(">> Table game_event is empty.");
+            sLog.outString(">> Table game_event is empty!");
            sLog.outString();
            return;
        }
diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp
index 2db0c49..7d76e05 100644
--- a/src/game/InstanceSaveMgr.cpp
+++ b/src/game/InstanceSaveMgr.cpp
@@ -342,30 +342,28 @@ void InstanceSaveManager::PackInstances()
        delete result;
    }

-    barGoLink bar( InstanceSet.size() + 1);
-    bar.step();
-
    uint32 InstanceNumber = 1;
-    // we do assume std::set is sorted properly on integer value
-    for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i)
-    {
-        if (*i != InstanceNumber)
-        {
-            // remap instance id
-            WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-        }
-
-        ++InstanceNumber;
-        bar.step();
-    }
-
+    if (!(InstanceSet.size())) {
+        barGoLink bar(1);
+        bar.step();
+    } else {
+        barGoLink bar(InstanceSet.size());
+        // we do assume std::set is sorted properly on integer value
+        for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i) {
+            if (*i != InstanceNumber) {
+                // remap instance id
+                WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+            }
+            ++InstanceNumber;
+            bar.step();
+        }
+    }
    sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber );
-    sLog.outString();
}

void InstanceSaveManager::LoadResetTimes()
diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp
index 44c6cab..3699598 100644
--- a/src/game/PoolHandler.cpp
+++ b/src/game/PoolHandler.cpp
@@ -378,25 +378,20 @@ void PoolHandler::LoadFromDB()
    }

    uint32 count = 0;
-
-    barGoLink bar(result->GetRowCount());
-    do
-    {
-        ++count;
-        Field *fields = result->Fetch();
-
-        bar.step();
-
-        uint16 pool_id = fields[0].GetUInt16();
-
-        PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id];
-        pPoolTemplate.MaxLimit  = fields[1].GetUInt32();
-
-    } while (result->NextRow());
-
-    sLog.outString();
-    sLog.outString( ">> Loaded %u objects pools", count );
-    delete result;
+    {
+        barGoLink bar(result->GetRowCount());
+        do {
+            ++count;
+            Field *fields = result->Fetch();
+            bar.step();
+            uint16 pool_id = fields[0].GetUInt16();
+            PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id];
+            pPoolTemplate.MaxLimit  = fields[1].GetUInt32();
+        } while (result->NextRow());
+        sLog.outString();
+        sLog.outString(">> Loaded %u objects pools", count);
+        delete result;
+    }

    // Creatures

@@ -412,7 +407,7 @@ void PoolHandler::LoadFromDB()
        bar2.step();

        sLog.outString();
-        sLog.outString(">> Loaded %u creatures in pools", count );
+        sLog.outString(">> Loaded 0 creatures in pools" );
    }
    else
    {
@@ -540,8 +535,8 @@ void PoolHandler::LoadFromDB()
        barGoLink bar2(1);
        bar2.step();

-        sLog.outString();
-        sLog.outString(">> Loaded %u pools in pools", count );
+        sLog.outString();
+        sLog.outString(">> Loaded %u pools in mother pools", count);
    }
    else
    {
@@ -612,9 +607,9 @@ void PoolHandler::LoadFromDB()
                }
            }
        }
-        sLog.outString();
-        sLog.outString( ">> Loaded %u pools in mother pools", count );
        delete result;
+        sLog.outString();
+        sLog.outString(">> Loaded %u pools in mother pools", count);
    }
}

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 75e07ff..ce9fb92 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2356,8 +2356,11 @@ void SpellMgr::LoadPetLevelupSpellMap()
    uint32 count = 0;
    uint32 family_count = 0;

+    barGoLink bar(sCreatureFamilyStore.GetNumRows());
+
    for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i)
    {
+        bar.step();
        CreatureFamilyEntry const *creatureFamily = sCreatureFamilyStore.LookupEntry(i);
        if(!creatureFamily)                                 // not exist
            continue;
@@ -2387,7 +2390,6 @@ void SpellMgr::LoadPetLevelupSpellMap()
            count++;
        }
    }
-
    sLog.outString();
    sLog.outString( ">> Loaded %u pet levelup and default spells for %u families", count, family_count );
}
@@ -2512,8 +2514,10 @@ void SpellMgr::LoadPetDefaultSpells()
            }
        }
    }
+    barGoLink bar(1);
+    bar.step();

-    sLog.outString();
+    sLog.outString();
    sLog.outString( ">> Loaded addition spells for %u pet spell data entries and %u summonable creature templates", countData, countCreature );
}

diff --git a/src/game/World.cpp b/src/game/World.cpp
index 8efd7bf..7538de0 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -1078,13 +1078,13 @@ void World::LoadConfigSettings(bool reload)

    if(reload)
    {
-        if(dataPath!=m_dataPath)
-            sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).",m_dataPath.c_str());
+        if(dataPath != m_dataPath)
+            sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).", m_dataPath.c_str());
    }
    else
    {
        m_dataPath = dataPath;
-        sLog.outString("Using DataDir %s",m_dataPath.c_str());
+        sLog.outString("Using DataDir:           \\t\\t%s", m_dataPath.c_str());
    }

    bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", false);
@@ -1095,9 +1095,11 @@ void World::LoadConfigSettings(bool reload)
    VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight);
    VMAP::VMapFactory::createOrGetVMapManager()->preventMapsFromBeingUsed(ignoreMapIds.c_str());
    VMAP::VMapFactory::PreventSpellsFromBeingTestedForLoS(ignoreSpellIds.c_str());
-    sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight);
-    sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str());
-    sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");
+    sLog.outString("VMap support included.");
+    sLog.outString("LineOfSight:             \\t\\t%i", enableLOS);
+    sLog.outString("getHeight:               \\t\\t%i", enableHeight);
+    sLog.outString("VMap data directory is:  \\t\\t%svmaps", m_dataPath.c_str());
+    sLog.outString("VMap config keys are:    \\t\\tvmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");
}

/// Initialize the World
@@ -1269,8 +1271,11 @@ void World::SetInitialWorldSettings()
    sLog.outString( "Loading Gameobject Respawn Data..." ); // must be after PackInstances()
    objmgr.LoadGameobjectRespawnTimes();

-    sLog.outString( "Loading Objects Pooling Data...");
+    sLog.outString( "Loading Pooling Data...");
+    sLog.outString();
    poolhandler.LoadFromDB();
+    sLog.outString( ">>> Pooling Data loaded");
+    sLog.outString();

    sLog.outString( "Loading Game Event Data...");
    sLog.outString();
@@ -1558,8 +1563,9 @@ void World::DetectDBCLang()
    }

    m_defaultDbcLocale = LocaleConstant(default_locale);
-
-    sLog.outString("Using %s DBC Locale as default. All available DBC locales: %s",localeNames[m_defaultDbcLocale],availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());
+    const char *available_locales = availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str();
+    sLog.outString("Default DBC Locale:      \\t\\t%s", localeNames[m_defaultDbcLocale]);
+    sLog.outString("Available DBC locales:   \\t\\t%s", available_locales);
    sLog.outString();
}

diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp
index 24c372b..eb5d0ef 100644
--- a/src/mangosd/Main.cpp
+++ b/src/mangosd/Main.cpp
@@ -158,9 +158,9 @@ extern int main(int argc, char **argv)
    sLog.outTitle( "        MM  MMM http://getmangos.eu");
    sLog.outTitle( "        MMMMMM\\n\\n");

-    sLog.outString("Using configuration file %s.", cfg_file);
+    sLog.outString("Configuration file:      \\t\\t%s.", cfg_file);

-    sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
+    sLog.outDetail("SSL info:                \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
    if (SSLeay() < 0x009080bfL )
    {
        sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!");
diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp
index 56dd504..8c90da5 100644
--- a/src/mangosd/Master.cpp
+++ b/src/mangosd/Master.cpp
@@ -404,7 +404,7 @@ bool Master::_StartDB()
        sLog.outError("Database not specified in configuration file");
        return false;
    }
-    sLog.outString("World Database: %s", dbstring.c_str());
+    sLog.outString("World Database:          \\t\\t%s", dbstring.c_str());

    ///- Initialise the world database
    if(!WorldDatabase.Initialize(dbstring.c_str()))
@@ -422,7 +422,7 @@ bool Master::_StartDB()
        sLog.outError("Character Database not specified in configuration file");
        return false;
    }
-    sLog.outString("Character Database: %s", dbstring.c_str());
+    sLog.outString("Character Database:      \\t\\t%s", dbstring.c_str());

    ///- Initialise the Character database
    if(!CharacterDatabase.Initialize(dbstring.c_str()))
@@ -443,7 +443,7 @@ bool Master::_StartDB()
    }

    ///- Initialise the login database
-    sLog.outString("Login Database: %s", dbstring.c_str() );
+    sLog.outString("Login Database:          \\t\\t%s", dbstring.c_str());
    if(!loginDatabase.Initialize(dbstring.c_str()))
    {
        sLog.outError("Cannot connect to login database %s",dbstring.c_str());
@@ -461,15 +461,15 @@ bool Master::_StartDB()
        return false;
    }

-    sLog.outString("Realm running as realm ID %d", realmID);
+    sLog.outString("Running realm ID:        \\t\\t%d", realmID);

    ///- Clean the database before starting
    clearOnlineAccounts();

    sWorld.LoadDBVersion();

-    sLog.outString("Using World DB: %s", sWorld.GetDBVersion());
-    sLog.outString("Using creature EventAI: %s", sWorld.GetCreatureEventAIVersion());
+    sLog.outString("Using World DB version:  \\t\\t%s", sWorld.GetDBVersion());
+    sLog.outString("Using creature EventAI:  \\t\\t%s", sWorld.GetCreatureEventAIVersion());
    return true;
}

diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp
index 13fdc57..b982abb 100644
--- a/src/realmd/Main.cpp
+++ b/src/realmd/Main.cpp
@@ -149,7 +149,7 @@ extern int main(int argc, char **argv)

    sLog.outString( "%s [realm-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) );
    sLog.outString( "<Ctrl-C> to stop.\\n" );
-    sLog.outString("Using configuration file %s.", cfg_file);
+    sLog.outString("Configuration file:      \\t\\t%s.", cfg_file);

    ///- Check the version of the configuration file
    uint32 confVersion = sConfig.GetIntDefault("ConfVersion", 0);
@@ -165,7 +165,7 @@ extern int main(int argc, char **argv)
        while (pause > clock()) {}
    }

-    sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
+    sLog.outDetail("SSL info:                \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
    if (SSLeay() < 0x009080bfL )
    {
        sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!");
@@ -320,8 +320,8 @@ bool StartDB()
        return false;
    }

-    sLog.outString("Database: %s", dbstring.c_str() );
-    if(!loginDatabase.Initialize(dbstring.c_str()))
+    sLog.outString("Login Database:          \\t\\t%s", dbstring.c_str());
+    if (!loginDatabase.Initialize(dbstring.c_str()))
    {
        sLog.outError("Cannot connect to database");
        return false;
diff --git a/src/realmd/RealmList.cpp b/src/realmd/RealmList.cpp
index 1bb0a97..73ff2f5 100644
--- a/src/realmd/RealmList.cpp
+++ b/src/realmd/RealmList.cpp
@@ -75,25 +75,20 @@ void RealmList::UpdateIfNeed()
    UpdateRealms(false);
}

-void RealmList::UpdateRealms(bool init)
-{
-    sLog.outDetail("Updating Realm List...");
-
+void RealmList::UpdateRealms(bool init) {
+    sLog.outString("Updating List of Realms...");
    QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population FROM realmlist WHERE color <> 3 ORDER BY name" );

    ///- Circle through results and add them to the realm map
-    if(result)
-    {
-        do
-        {
-            Field *fields = result->Fetch();
-
+    if (result) {
+        do {
+            Field *fields = result->Fetch();
            uint8 allowedSecurityLevel = fields[7].GetUInt8();
-
-            UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(),fields[2].GetCppString(),fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat() );
-            if(init)
-                sLog.outString("Added realm \\"%s\\".", fields[1].GetString());
-        } while( result->NextRow() );
+            UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(), fields[2].GetCppString(), fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat());
+            if (init) {
+                sLog.outString("\\tAdded realm \\"%s\\" on host %s:%s.", fields[1].GetString(), fields[2].GetString(), fields[3].GetString());
+            }
+        } while (result->NextRow());
        delete result;
    }
}
diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp
index 9696172..31c800f 100644
--- a/src/shared/Database/DatabaseMysql.cpp
+++ b/src/shared/Database/DatabaseMysql.cpp
@@ -141,10 +141,9 @@ bool DatabaseMysql::Initialize(const char *infoString)

    if (mMysql)
    {
-        sLog.outDetail( "Connected to MySQL database at %s",
-            host.c_str());
-        sLog.outString( "MySQL client library: %s", mysql_get_client_info());
-        sLog.outString( "MySQL server ver: %s ", mysql_get_server_info( mMysql));
+        sLog.outDetail( "\\tConnected to MySQL DB at:\\t%s:%u", host.c_str(), port);
+        sLog.outString( "\\tMySQL client library:    \\t%s", mysql_get_client_info());
+        sLog.outString( "\\tMySQL server ver:        \\t%s", mysql_get_server_info( mMysql));

        /*----------SET AUTOCOMMIT ON---------*/
        // It seems mysql 5.0.x have enabled this feature
@@ -155,9 +154,9 @@ bool DatabaseMysql::Initialize(const char *infoString)
        // autocommit is turned of during it.
        // Setting it to on makes atomic updates work
        if (!mysql_autocommit(mMysql, 1))
-            sLog.outDetail("AUTOCOMMIT SUCCESSFULLY SET TO 1");
+            sLog.outDetail("\\tAUTOCOMMIT SUCCESSFULLY SET TO 1");
        else
-            sLog.outDetail("AUTOCOMMIT NOT SET TO 1");
+            sLog.outDetail("\\tAUTOCOMMIT NOT SET TO 1");
        /*-------------------------------------*/

        // set connection properties to UTF8 to properly handle locales for different

Link to comment
Share on other sites

Each tab in code changed to 4 spaces.

diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp
index 140aa78..4fa4121 100644
--- a/src/game/GameEventMgr.cpp
+++ b/src/game/GameEventMgr.cpp
@@ -95,7 +95,7 @@ void GameEventMgr::LoadFromDB()
        QueryResult *result = WorldDatabase.Query("SELECT MAX(entry) FROM game_event");
        if( !result )
        {
-            sLog.outString(">> Table game_event is empty.");
+            sLog.outString(">> Table game_event is empty!");
            sLog.outString();
            return;
        }
diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp
index 2db0c49..7d76e05 100644
--- a/src/game/InstanceSaveMgr.cpp
+++ b/src/game/InstanceSaveMgr.cpp
@@ -342,30 +342,28 @@ void InstanceSaveManager::PackInstances()
        delete result;
    }

-    barGoLink bar( InstanceSet.size() + 1);
-    bar.step();
-
    uint32 InstanceNumber = 1;
-    // we do assume std::set is sorted properly on integer value
-    for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i)
-    {
-        if (*i != InstanceNumber)
-        {
-            // remap instance id
-            WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i);
-            CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
-        }
-
-        ++InstanceNumber;
-        bar.step();
-    }
-
+    if (!(InstanceSet.size())) {
+        barGoLink bar(1);
+        bar.step();
+    } else {
+        barGoLink bar(InstanceSet.size());
+        // we do assume std::set is sorted properly on integer value
+        for (std::set<uint32>::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i) {
+            if (*i != InstanceNumber) {
+                // remap instance id
+                WorldDatabase.PExecute("UPDATE creature_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                WorldDatabase.PExecute("UPDATE gameobject_respawn SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE corpse SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE character_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE instance SET id = '%u' WHERE id = '%u'", InstanceNumber, *i);
+                CharacterDatabase.PExecute("UPDATE group_instance SET instance = '%u' WHERE instance = '%u'", InstanceNumber, *i);
+            }
+            ++InstanceNumber;
+            bar.step();
+        }
+    }
    sLog.outString( ">> Instance numbers remapped, next instance id is %u", InstanceNumber );
-    sLog.outString();
}

void InstanceSaveManager::LoadResetTimes()
diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp
index 44c6cab..3699598 100644
--- a/src/game/PoolHandler.cpp
+++ b/src/game/PoolHandler.cpp
@@ -378,25 +378,20 @@ void PoolHandler::LoadFromDB()
    }

    uint32 count = 0;
-
-    barGoLink bar(result->GetRowCount());
-    do
-    {
-        ++count;
-        Field *fields = result->Fetch();
-
-        bar.step();
-
-        uint16 pool_id = fields[0].GetUInt16();
-
-        PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id];
-        pPoolTemplate.MaxLimit  = fields[1].GetUInt32();
-
-    } while (result->NextRow());
-
-    sLog.outString();
-    sLog.outString( ">> Loaded %u objects pools", count );
-    delete result;
+    {
+        barGoLink bar(result->GetRowCount());
+        do {
+            ++count;
+            Field *fields = result->Fetch();
+            bar.step();
+            uint16 pool_id = fields[0].GetUInt16();
+            PoolTemplateData& pPoolTemplate = mPoolTemplate[pool_id];
+            pPoolTemplate.MaxLimit  = fields[1].GetUInt32();
+        } while (result->NextRow());
+        sLog.outString();
+        sLog.outString(">> Loaded %u objects pools", count);
+        delete result;
+    }

    // Creatures

@@ -412,7 +407,7 @@ void PoolHandler::LoadFromDB()
        bar2.step();

        sLog.outString();
-        sLog.outString(">> Loaded %u creatures in pools", count );
+        sLog.outString(">> Loaded 0 creatures in pools" );
    }
    else
    {
@@ -540,8 +535,8 @@ void PoolHandler::LoadFromDB()
        barGoLink bar2(1);
        bar2.step();

-        sLog.outString();
-        sLog.outString(">> Loaded %u pools in pools", count );
+        sLog.outString();
+        sLog.outString(">> Loaded %u pools in mother pools", count);
    }
    else
    {
@@ -612,9 +607,9 @@ void PoolHandler::LoadFromDB()
                }
            }
        }
-        sLog.outString();
-        sLog.outString( ">> Loaded %u pools in mother pools", count );
        delete result;
+        sLog.outString();
+        sLog.outString(">> Loaded %u pools in mother pools", count);
    }
}

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 75e07ff..ce9fb92 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2356,8 +2356,11 @@ void SpellMgr::LoadPetLevelupSpellMap()
    uint32 count = 0;
    uint32 family_count = 0;

+    barGoLink bar(sCreatureFamilyStore.GetNumRows());
+
    for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i)
    {
+        bar.step();
        CreatureFamilyEntry const *creatureFamily = sCreatureFamilyStore.LookupEntry(i);
        if(!creatureFamily)                                 // not exist
            continue;
@@ -2387,7 +2390,6 @@ void SpellMgr::LoadPetLevelupSpellMap()
            count++;
        }
    }
-
    sLog.outString();
    sLog.outString( ">> Loaded %u pet levelup and default spells for %u families", count, family_count );
}
@@ -2512,8 +2514,10 @@ void SpellMgr::LoadPetDefaultSpells()
            }
        }
    }
+    barGoLink bar(1);
+    bar.step();

-    sLog.outString();
+    sLog.outString();
    sLog.outString( ">> Loaded addition spells for %u pet spell data entries and %u summonable creature templates", countData, countCreature );
}

diff --git a/src/game/World.cpp b/src/game/World.cpp
index 8efd7bf..7538de0 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -1078,13 +1078,13 @@ void World::LoadConfigSettings(bool reload)

    if(reload)
    {
-        if(dataPath!=m_dataPath)
-            sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).",m_dataPath.c_str());
+        if(dataPath != m_dataPath)
+            sLog.outError("DataDir option can't be changed at mangosd.conf reload, using current value (%s).", m_dataPath.c_str());
    }
    else
    {
        m_dataPath = dataPath;
-        sLog.outString("Using DataDir %s",m_dataPath.c_str());
+        sLog.outString("Using DataDir:           \\t\\t%s", m_dataPath.c_str());
    }

    bool enableLOS = sConfig.GetBoolDefault("vmap.enableLOS", false);
@@ -1095,9 +1095,11 @@ void World::LoadConfigSettings(bool reload)
    VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight);
    VMAP::VMapFactory::createOrGetVMapManager()->preventMapsFromBeingUsed(ignoreMapIds.c_str());
    VMAP::VMapFactory::PreventSpellsFromBeingTestedForLoS(ignoreSpellIds.c_str());
-    sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight);
-    sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str());
-    sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");
+    sLog.outString("VMap support included.");
+    sLog.outString("LineOfSight:             \\t\\t%i", enableLOS);
+    sLog.outString("getHeight:               \\t\\t%i", enableHeight);
+    sLog.outString("VMap data directory is:  \\t\\t%svmaps", m_dataPath.c_str());
+    sLog.outString("VMap config keys are:    \\t\\tvmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");
}

/// Initialize the World
@@ -1269,8 +1271,11 @@ void World::SetInitialWorldSettings()
    sLog.outString( "Loading Gameobject Respawn Data..." ); // must be after PackInstances()
    objmgr.LoadGameobjectRespawnTimes();

-    sLog.outString( "Loading Objects Pooling Data...");
+    sLog.outString( "Loading Pooling Data...");
+    sLog.outString();
    poolhandler.LoadFromDB();
+    sLog.outString( ">>> Pooling Data loaded");
+    sLog.outString();

    sLog.outString( "Loading Game Event Data...");
    sLog.outString();
@@ -1558,8 +1563,9 @@ void World::DetectDBCLang()
    }

    m_defaultDbcLocale = LocaleConstant(default_locale);
-
-    sLog.outString("Using %s DBC Locale as default. All available DBC locales: %s",localeNames[m_defaultDbcLocale],availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());
+    const char *available_locales = availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str();
+    sLog.outString("Default DBC Locale:      \\t\\t%s", localeNames[m_defaultDbcLocale]);
+    sLog.outString("Available DBC locales:   \\t\\t%s", available_locales);
    sLog.outString();
}

diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp
index 24c372b..eb5d0ef 100644
--- a/src/mangosd/Main.cpp
+++ b/src/mangosd/Main.cpp
@@ -158,9 +158,9 @@ extern int main(int argc, char **argv)
    sLog.outTitle( "        MM  MMM http://getmangos.eu");
    sLog.outTitle( "        MMMMMM\\n\\n");

-    sLog.outString("Using configuration file %s.", cfg_file);
+    sLog.outString("Configuration file:      \\t\\t%s.", cfg_file);

-    sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
+    sLog.outDetail("SSL info:                \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
    if (SSLeay() < 0x009080bfL )
    {
        sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!");
diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp
index 56dd504..8c90da5 100644
--- a/src/mangosd/Master.cpp
+++ b/src/mangosd/Master.cpp
@@ -404,7 +404,7 @@ bool Master::_StartDB()
        sLog.outError("Database not specified in configuration file");
        return false;
    }
-    sLog.outString("World Database: %s", dbstring.c_str());
+    sLog.outString("World Database:          \\t\\t%s", dbstring.c_str());

    ///- Initialise the world database
    if(!WorldDatabase.Initialize(dbstring.c_str()))
@@ -422,7 +422,7 @@ bool Master::_StartDB()
        sLog.outError("Character Database not specified in configuration file");
        return false;
    }
-    sLog.outString("Character Database: %s", dbstring.c_str());
+    sLog.outString("Character Database:      \\t\\t%s", dbstring.c_str());

    ///- Initialise the Character database
    if(!CharacterDatabase.Initialize(dbstring.c_str()))
@@ -443,7 +443,7 @@ bool Master::_StartDB()
    }

    ///- Initialise the login database
-    sLog.outString("Login Database: %s", dbstring.c_str() );
+    sLog.outString("Login Database:          \\t\\t%s", dbstring.c_str());
    if(!loginDatabase.Initialize(dbstring.c_str()))
    {
        sLog.outError("Cannot connect to login database %s",dbstring.c_str());
@@ -461,15 +461,15 @@ bool Master::_StartDB()
        return false;
    }

-    sLog.outString("Realm running as realm ID %d", realmID);
+    sLog.outString("Running realm ID:        \\t\\t%d", realmID);

    ///- Clean the database before starting
    clearOnlineAccounts();

    sWorld.LoadDBVersion();

-    sLog.outString("Using World DB: %s", sWorld.GetDBVersion());
-    sLog.outString("Using creature EventAI: %s", sWorld.GetCreatureEventAIVersion());
+    sLog.outString("Using World DB version:  \\t\\t%s", sWorld.GetDBVersion());
+    sLog.outString("Using creature EventAI:  \\t\\t%s", sWorld.GetCreatureEventAIVersion());
    return true;
}

diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp
index 13fdc57..b982abb 100644
--- a/src/realmd/Main.cpp
+++ b/src/realmd/Main.cpp
@@ -149,7 +149,7 @@ extern int main(int argc, char **argv)

    sLog.outString( "%s [realm-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) );
    sLog.outString( "<Ctrl-C> to stop.\\n" );
-    sLog.outString("Using configuration file %s.", cfg_file);
+    sLog.outString("Configuration file:      \\t\\t%s.", cfg_file);

    ///- Check the version of the configuration file
    uint32 confVersion = sConfig.GetIntDefault("ConfVersion", 0);
@@ -165,7 +165,7 @@ extern int main(int argc, char **argv)
        while (pause > clock()) {}
    }

-    sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
+    sLog.outDetail("SSL info:                \\t\\t%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
    if (SSLeay() < 0x009080bfL )
    {
        sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server impossible!");
@@ -320,8 +320,8 @@ bool StartDB()
        return false;
    }

-    sLog.outString("Database: %s", dbstring.c_str() );
-    if(!loginDatabase.Initialize(dbstring.c_str()))
+    sLog.outString("Login Database:          \\t\\t%s", dbstring.c_str());
+    if (!loginDatabase.Initialize(dbstring.c_str()))
    {
        sLog.outError("Cannot connect to database");
        return false;
diff --git a/src/realmd/RealmList.cpp b/src/realmd/RealmList.cpp
index 1bb0a97..73ff2f5 100644
--- a/src/realmd/RealmList.cpp
+++ b/src/realmd/RealmList.cpp
@@ -75,25 +75,20 @@ void RealmList::UpdateIfNeed()
    UpdateRealms(false);
}

-void RealmList::UpdateRealms(bool init)
-{
-    sLog.outDetail("Updating Realm List...");
-
+void RealmList::UpdateRealms(bool init) {
+    sLog.outString("Updating List of Realms...");
    QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population FROM realmlist WHERE color <> 3 ORDER BY name" );

    ///- Circle through results and add them to the realm map
-    if(result)
-    {
-        do
-        {
-            Field *fields = result->Fetch();
-
+    if (result) {
+        do {
+            Field *fields = result->Fetch();
            uint8 allowedSecurityLevel = fields[7].GetUInt8();
-
-            UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(),fields[2].GetCppString(),fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat() );
-            if(init)
-                sLog.outString("Added realm \\"%s\\".", fields[1].GetString());
-        } while( result->NextRow() );
+            UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(), fields[2].GetCppString(), fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat());
+            if (init) {
+                sLog.outString("\\tAdded realm \\"%s\\" on host %s:%s.", fields[1].GetString(), fields[2].GetString(), fields[3].GetString());
+            }
+        } while (result->NextRow());
        delete result;
    }
}
diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp
index 9696172..31c800f 100644
--- a/src/shared/Database/DatabaseMysql.cpp
+++ b/src/shared/Database/DatabaseMysql.cpp
@@ -141,10 +141,9 @@ bool DatabaseMysql::Initialize(const char *infoString)

    if (mMysql)
    {
-        sLog.outDetail( "Connected to MySQL database at %s",
-            host.c_str());
-        sLog.outString( "MySQL client library: %s", mysql_get_client_info());
-        sLog.outString( "MySQL server ver: %s ", mysql_get_server_info( mMysql));
+        sLog.outDetail( "\\tConnected to MySQL DB at:\\t%s:%u", host.c_str(), port);
+        sLog.outString( "\\tMySQL client library:    \\t%s", mysql_get_client_info());
+        sLog.outString( "\\tMySQL server ver:        \\t%s", mysql_get_server_info( mMysql));

        /*----------SET AUTOCOMMIT ON---------*/
        // It seems mysql 5.0.x have enabled this feature
@@ -155,9 +154,9 @@ bool DatabaseMysql::Initialize(const char *infoString)
        // autocommit is turned of during it.
        // Setting it to on makes atomic updates work
        if (!mysql_autocommit(mMysql, 1))
-            sLog.outDetail("AUTOCOMMIT SUCCESSFULLY SET TO 1");
+            sLog.outDetail("\\tAUTOCOMMIT SUCCESSFULLY SET TO 1");
        else
-            sLog.outDetail("AUTOCOMMIT NOT SET TO 1");
+            sLog.outDetail("\\tAUTOCOMMIT NOT SET TO 1");
        /*-------------------------------------*/

        // set connection properties to UTF8 to properly handle locales for different

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use