mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Logging: Refactored appender creation to allow using logging without mysql dependency in tools (future task)
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "BattlenetServerManager.h"
|
||||
#include "Realm/Realm.h"
|
||||
#include "DatabaseLoader.h"
|
||||
#include "AppenderDB.h"
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
@@ -125,11 +126,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