mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp * rework logging * add fmt replace logs * logging * FMT_LOG_ * settings * fix startup * 1 * 2 * 3 * 4 * 5 * fmt::print * to fmt
This commit is contained in:
@@ -97,8 +97,7 @@ uint32 DatabaseWorkerPool<T>::Open()
|
||||
{
|
||||
WPFatal(_connectionInfo.get(), "Connection info was not set!");
|
||||
|
||||
LOG_INFO("sql.driver", "Opening DatabasePool '%s'. "
|
||||
"Asynchronous connections: %u, synchronous connections: %u.",
|
||||
LOG_INFO("sql.driver", "Opening DatabasePool '{}'. Asynchronous connections: {}, synchronous connections: {}.",
|
||||
GetDatabaseName(), _async_threads, _synch_threads);
|
||||
|
||||
uint32 error = OpenConnections(IDX_ASYNC, _async_threads);
|
||||
@@ -110,9 +109,8 @@ uint32 DatabaseWorkerPool<T>::Open()
|
||||
|
||||
if (!error)
|
||||
{
|
||||
LOG_INFO("sql.driver", "DatabasePool '%s' opened successfully. " SZFMTD
|
||||
" total connections running.", GetDatabaseName(),
|
||||
(_connections[IDX_SYNCH].size() + _connections[IDX_ASYNC].size()));
|
||||
LOG_INFO("sql.driver", "DatabasePool '{}' opened successfully. {} total connections running.",
|
||||
GetDatabaseName(), (_connections[IDX_SYNCH].size() + _connections[IDX_ASYNC].size()));
|
||||
}
|
||||
|
||||
LOG_INFO("sql.driver", " ");
|
||||
@@ -123,13 +121,12 @@ uint32 DatabaseWorkerPool<T>::Open()
|
||||
template <class T>
|
||||
void DatabaseWorkerPool<T>::Close()
|
||||
{
|
||||
LOG_INFO("sql.driver", "Closing down DatabasePool '%s'.", GetDatabaseName());
|
||||
LOG_INFO("sql.driver", "Closing down DatabasePool '{}'.", GetDatabaseName());
|
||||
|
||||
//! Closes the actualy MySQL connection.
|
||||
_connections[IDX_ASYNC].clear();
|
||||
|
||||
LOG_INFO("sql.driver", "Asynchronous connections on DatabasePool '%s' terminated. "
|
||||
"Proceeding with synchronous connections.",
|
||||
LOG_INFO("sql.driver", "Asynchronous connections on DatabasePool '{}' terminated. Proceeding with synchronous connections.",
|
||||
GetDatabaseName());
|
||||
|
||||
//! Shut down the synchronous connections
|
||||
@@ -138,7 +135,7 @@ void DatabaseWorkerPool<T>::Close()
|
||||
//! meaning there can be no concurrent access at this point.
|
||||
_connections[IDX_SYNCH].clear();
|
||||
|
||||
LOG_INFO("sql.driver", "All connections on DatabasePool '%s' closed.", GetDatabaseName());
|
||||
LOG_INFO("sql.driver", "All connections on DatabasePool '{}' closed.", GetDatabaseName());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -443,7 +440,7 @@ T* DatabaseWorkerPool<T>::GetFreeConnection()
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << boost::stacktrace::stacktrace();
|
||||
LOG_WARN("sql.performances", "Sync query at:\n%s", ss.str().c_str());
|
||||
LOG_WARN("sql.performances", "Sync query at:\n{}", ss.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user