Small fix to prevent unintended DB logging
--HG-- branch : trunk
This commit is contained in:
@@ -403,6 +403,7 @@ int Master::Run()
|
|||||||
/// Initialize connection to the databases
|
/// Initialize connection to the databases
|
||||||
bool Master::_StartDB()
|
bool Master::_StartDB()
|
||||||
{
|
{
|
||||||
|
sLog.SetLogDB(false);
|
||||||
std::string dbstring;
|
std::string dbstring;
|
||||||
|
|
||||||
///- Get world database info from configuration file
|
///- Get world database info from configuration file
|
||||||
@@ -459,7 +460,7 @@ bool Master::_StartDB()
|
|||||||
}
|
}
|
||||||
sLog.outString("Realm running as realm ID %d", realmID);
|
sLog.outString("Realm running as realm ID %d", realmID);
|
||||||
|
|
||||||
///- Initialize the DB logging system
|
///- Initialize the DB logging system
|
||||||
if(sConfig.GetBoolDefault("EnableLogDB", false))
|
if(sConfig.GetBoolDefault("EnableLogDB", false))
|
||||||
{
|
{
|
||||||
// everything successful - set var to enable DB logging once startup finished.
|
// everything successful - set var to enable DB logging once startup finished.
|
||||||
@@ -471,6 +472,7 @@ bool Master::_StartDB()
|
|||||||
{
|
{
|
||||||
sLog.SetLogDBLater(false);
|
sLog.SetLogDBLater(false);
|
||||||
sLog.SetLogDB(false);
|
sLog.SetLogDB(false);
|
||||||
|
sLog.SetRealmID(realmID);
|
||||||
}
|
}
|
||||||
|
|
||||||
///- Clean the database before starting
|
///- Clean the database before starting
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ void usage(const char *prog)
|
|||||||
/// Launch the realm server
|
/// Launch the realm server
|
||||||
extern int main(int argc, char **argv)
|
extern int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
sLog.SetLogDB(false);
|
||||||
///- Command line parsing to get the configuration file name
|
///- Command line parsing to get the configuration file name
|
||||||
char const* cfg_file = _TRINITY_REALM_CONFIG;
|
char const* cfg_file = _TRINITY_REALM_CONFIG;
|
||||||
int c=1;
|
int c=1;
|
||||||
@@ -191,6 +192,12 @@ extern int main(int argc, char **argv)
|
|||||||
// ensure we've set realm to 0 (realmd realmid)
|
// ensure we've set realm to 0 (realmd realmid)
|
||||||
sLog.SetRealmID(0);
|
sLog.SetRealmID(0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sLog.SetLogDBLater(false);
|
||||||
|
sLog.SetLogDB(false);
|
||||||
|
sLog.SetRealmID(0);
|
||||||
|
}
|
||||||
|
|
||||||
///- Get the list of realms for the server
|
///- Get the list of realms for the server
|
||||||
m_realmList.Initialize(sConfig.GetIntDefault("RealmsStateUpdateDelay", 20));
|
m_realmList.Initialize(sConfig.GetIntDefault("RealmsStateUpdateDelay", 20));
|
||||||
|
|||||||
Reference in New Issue
Block a user