Changed: Init log before calling prelogInit()
This commit is contained in:
parent
b4de9e66f5
commit
f5e60a4fea
3 changed files with 29 additions and 15 deletions
|
@ -289,6 +289,10 @@ int main(int argc, char **argv)
|
|||
|
||||
#else
|
||||
// TODO for Linux : splashscreen
|
||||
|
||||
// initialize log
|
||||
initLog();
|
||||
|
||||
#endif
|
||||
|
||||
// initialize patch manager and set the ryzom full path, before it's used
|
||||
|
|
|
@ -796,6 +796,28 @@ static bool addRyzomIconBitmap(const std::string &directory, vector<CBitmap> &bi
|
|||
}
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------
|
||||
// initLog :
|
||||
// Initialize the client.log file
|
||||
//---------------------------------------------------
|
||||
void initLog()
|
||||
{
|
||||
// Add a displayer for Debug Infos.
|
||||
createDebug();
|
||||
|
||||
// Client.Log displayer
|
||||
nlassert( !ErrorLog->getDisplayer("CLIENT.LOG") );
|
||||
CFileDisplayer *ClientLogDisplayer = new CFileDisplayer(getLogDirectory() + "client.log", true, "CLIENT.LOG");
|
||||
DebugLog->addDisplayer (ClientLogDisplayer);
|
||||
InfoLog->addDisplayer (ClientLogDisplayer);
|
||||
WarningLog->addDisplayer (ClientLogDisplayer);
|
||||
ErrorLog->addDisplayer (ClientLogDisplayer);
|
||||
AssertLog->addDisplayer (ClientLogDisplayer);
|
||||
|
||||
// Display the client version.
|
||||
nlinfo("RYZOM VERSION : %s", getDebugVersion().c_str());
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
// prelogInit :
|
||||
// Initialize the application before login
|
||||
|
@ -848,21 +870,6 @@ void prelogInit()
|
|||
// Due to Bug #906, we disable the stl xml allocation
|
||||
// nlverify (xmlMemSetup (XmlFree4NeL, XmlMalloc4NeL, XmlRealloc4NeL, XmlStrdup4NeL) == 0);
|
||||
|
||||
// Add a displayer for Debug Infos.
|
||||
createDebug();
|
||||
|
||||
// Client.Log displayer
|
||||
nlassert( !ErrorLog->getDisplayer("CLIENT.LOG") );
|
||||
CFileDisplayer *ClientLogDisplayer = new CFileDisplayer(getLogDirectory() + "client.log", true, "CLIENT.LOG");
|
||||
DebugLog->addDisplayer (ClientLogDisplayer);
|
||||
InfoLog->addDisplayer (ClientLogDisplayer);
|
||||
WarningLog->addDisplayer (ClientLogDisplayer);
|
||||
ErrorLog->addDisplayer (ClientLogDisplayer);
|
||||
AssertLog->addDisplayer (ClientLogDisplayer);
|
||||
|
||||
// Display the client version.
|
||||
nlinfo("RYZOM VERSION : %s", getDebugVersion().c_str());
|
||||
|
||||
// Init the debug memory
|
||||
initDebugMemory();
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@ namespace NLMISC
|
|||
class IProgressCallback;
|
||||
}
|
||||
|
||||
// Initialize the log
|
||||
void initLog();
|
||||
|
||||
// Initialize the application before login step
|
||||
void prelogInit();
|
||||
|
||||
|
|
Loading…
Reference in a new issue