diff options
author | XTZGZoReX <none@none> | 2009-03-19 21:13:52 +0100 |
---|---|---|
committer | XTZGZoReX <none@none> | 2009-03-19 21:13:52 +0100 |
commit | 9fe43fa9c0bd21f6c203072f19a77a570680ecab (patch) | |
tree | 5592cf3a9b39a04e7e81295408625713a6fdd2bd /src/mangosd/Master.cpp | |
parent | fd2f768dfd7c877880942477a7d1b1645f5bfab9 (diff) |
* Implementing database logging:
** LogTime and LogColors config options removed due to incompatibility.
** Old file logging still available.
** Totally redone the Log class.
** Config options added: EnableLogDB, DBLogLevel, LogDB.Char, LogDB.RA, LogDB.GM -- remember to update config file.
** SQL updates attached.
--HG--
branch : trunk
Diffstat (limited to 'src/mangosd/Master.cpp')
-rw-r--r-- | src/mangosd/Master.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp index eb82d776255..cf1ac0f2c27 100644 --- a/src/mangosd/Master.cpp +++ b/src/mangosd/Master.cpp @@ -202,15 +202,15 @@ int Master::Run() sLog.outString( "%s (core-daemon)", _FULLVERSION ); sLog.outString( "<Ctrl-C> to stop.\n" ); - sLog.outTitle( " ______ __"); - sLog.outTitle( "/\\__ _\\ __ __/\\ \\__"); - sLog.outTitle( "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\ ,_\\ __ __"); - sLog.outTitle( " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\"); - sLog.outTitle( " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\"); - sLog.outTitle( " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\"); - sLog.outTitle( " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\"); - sLog.outTitle( " C O R E /\\___/"); - sLog.outTitle( "http://TrinityCore.org \\/__/\n"); + sLog.outString( " ______ __"); + sLog.outString( "/\\__ _\\ __ __/\\ \\__"); + sLog.outString( "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\ ,_\\ __ __"); + sLog.outString( " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\"); + sLog.outString( " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\"); + sLog.outString( " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\"); + sLog.outString( " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\"); + sLog.outString( " C O R E /\\___/"); + sLog.outString( "http://TrinityCore.org \\/__/\n"); /// worldd PID file creation std::string pidfile = sConfig.GetStringDefault("PidFile", ""); @@ -282,7 +282,7 @@ int Master::Run() sLog.outError("Can't set used processors (hex): %x",curAff); } } - sLog.outString(); + sLog.outString(""); } bool Prio = sConfig.GetBoolDefault("ProcessPriority", false); @@ -294,7 +294,7 @@ int Master::Run() sLog.outString("TrinityCore process priority class set to HIGH"); else sLog.outError("ERROR: Can't set Trinityd process priority class."); - sLog.outString(); + sLog.outString(""); } } #endif @@ -459,6 +459,14 @@ bool Master::_StartDB() } sLog.outString("Realm running as realm ID %d", realmID); + ///- Initialize the DB logging system + if(sConfig.GetBoolDefault("EnableLogDB", false)) + { + // everything successful - set var to enable DB logging once startup finished. + sLog.SetLogDBLater(true); + sLog.SetRealmID(realmID); + } + ///- Clean the database before starting clearOnlineAccounts(); |