mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 16:16:27 +00:00
fix (core/logging/conf): Fix Logging for Modules (#11601)
* fix (core/logging/conf): Fix Logging for Modules Fix custom module logging and appender. Also included Logging Async Conf. * Update Log.cpp * Core/Logging: Force synchronous logging after io_service shutdown - fixes logging on worldserver shutdown https: //github.com/TrinityCore/TrinityCore/commit/c71987b1a1403fa20654cc24b37448ca807ff363 Co-Authored-By: Shauren <shauren.trinity@gmail.com> Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -199,7 +199,8 @@ int main(int argc, char** argv)
|
||||
|
||||
// Init all logs
|
||||
sLog->RegisterAppender<AppenderDB>();
|
||||
sLog->Initialize();
|
||||
// If logs are supposed to be handled async then we need to pass the IoContext into the Log singleton
|
||||
sLog->Initialize(sConfigMgr->GetOption<bool>("Log.Async.Enable", false) ? ioContext.get() : nullptr);
|
||||
|
||||
Acore::Banner::Show("worldserver-daemon",
|
||||
[](std::string_view text)
|
||||
@@ -421,6 +422,8 @@ int main(int argc, char** argv)
|
||||
// Shutdown starts here
|
||||
threadPool.reset();
|
||||
|
||||
sLog->SetSynchronous();
|
||||
|
||||
sScriptMgr->OnShutdown();
|
||||
|
||||
// set server offline
|
||||
|
||||
@@ -3914,6 +3914,16 @@ Logger.module=4,Console Server
|
||||
#Logger.vehicles=4,Console Server
|
||||
#Logger.warden=4,Console Server
|
||||
#Logger.weather=4,Console Server
|
||||
|
||||
#
|
||||
# Log.Async.Enable
|
||||
# Description: Enables asynchronous message logging.
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
Log.Async.Enable = 0
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
|
||||
Reference in New Issue
Block a user