refactor(Core/Server): Move Banner into separate file (#5207)

* refactor(Core/Server): Move Banner into separate file

* fix build

* Update Banner.cpp

* indent

* build

* build

* log

* LOG_INFO

* Update Banner.cpp

* Update Banner.h

* Update Main.cpp

* Update Main.cpp

* Update Master.cpp

* yes

* tes
This commit is contained in:
Kitzunu
2021-04-18 00:35:35 +02:00
committed by GitHub
parent 8c8bc61b40
commit 86192f38b7
5 changed files with 75 additions and 40 deletions

View File

@@ -9,6 +9,7 @@
/// \file
#include "AppenderDB.h"
#include "Banner.h"
#include "Common.h"
#include "Configuration/Config.h"
#include "Database/DatabaseEnv.h"
@@ -122,9 +123,18 @@ extern int main(int argc, char** argv)
sLog->RegisterAppender<AppenderDB>();
sLog->Initialize();
LOG_INFO("server.worldserver", "Using configuration file %s.", configFile.c_str());
LOG_INFO("server.worldserver", "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
LOG_INFO("server.worldserver", "Using ACE version: %s", ACE_VERSION);
acore::Banner::Show("worldserver-daemon",
[](char const* text)
{
LOG_INFO("server.worldserver", "%s", text);
},
[]()
{
LOG_INFO("server.worldserver", "> Using configuration file %s.", sConfigMgr->GetFilename().c_str());
LOG_INFO("server.worldserver", "> Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
LOG_INFO("server.worldserver", "> Using ACE version: %s", ACE_VERSION);
}
);
///- and run the 'Master'
/// @todo Why do we need this 'Master'? Can't all of this be in the Main as for Realmd?