mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Logging: Refactored appender creation to allow using logging without mysql dependency in tools (future task)
Conflicts: src/server/bnetserver/Main.cpp src/server/worldserver/Main.cpp
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include "WorldSocket.h"
|
||||
#include "WorldSocketMgr.h"
|
||||
#include "DatabaseLoader.h"
|
||||
#include "AppenderDB.h"
|
||||
|
||||
using namespace boost::program_options;
|
||||
|
||||
@@ -120,11 +121,9 @@ extern int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (sConfigMgr->GetBoolDefault("Log.Async.Enable", false))
|
||||
{
|
||||
// If logs are supposed to be handled async then we need to pass the io_service into the Log singleton
|
||||
Log::instance(&_ioService);
|
||||
}
|
||||
sLog->RegisterAppender<AppenderDB>();
|
||||
// If logs are supposed to be handled async then we need to pass the io_service into the Log singleton
|
||||
sLog->Initialize(sConfigMgr->GetBoolDefault("Log.Async.Enable", false) ? &_ioService : nullptr);
|
||||
|
||||
TC_LOG_INFO("server.worldserver", "%s (worldserver-daemon)", _FULLVERSION);
|
||||
TC_LOG_INFO("server.worldserver", "<Ctrl-C> to stop.\n");
|
||||
|
||||
Reference in New Issue
Block a user