Core/Logging: Performance-related tweaks to logging system

All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
This commit is contained in:
Spp
2013-05-13 15:07:36 +02:00
parent 243c325ca4
commit d1677b2db0
240 changed files with 4580 additions and 4563 deletions

View File

@@ -24,7 +24,7 @@ bool SQLQueryHolder::SetQuery(size_t index, const char *sql)
{
if (m_queries.size() <= index)
{
sLog->outError(LOG_FILTER_SQL, "Query index (%u) out of range (size: %u) for query: %s", uint32(index), (uint32)m_queries.size(), sql);
TC_LOG_ERROR(LOG_FILTER_SQL, "Query index (%u) out of range (size: %u) for query: %s", uint32(index), (uint32)m_queries.size(), sql);
return false;
}
@@ -44,7 +44,7 @@ bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...)
{
if (!format)
{
sLog->outError(LOG_FILTER_SQL, "Query (index: %u) is empty.", uint32(index));
TC_LOG_ERROR(LOG_FILTER_SQL, "Query (index: %u) is empty.", uint32(index));
return false;
}
@@ -56,7 +56,7 @@ bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...)
if (res == -1)
{
sLog->outError(LOG_FILTER_SQL, "SQL Query truncated (and not execute) for format: %s", format);
TC_LOG_ERROR(LOG_FILTER_SQL, "SQL Query truncated (and not execute) for format: %s", format);
return false;
}
@@ -67,7 +67,7 @@ bool SQLQueryHolder::SetPreparedQuery(size_t index, PreparedStatement* stmt)
{
if (m_queries.size() <= index)
{
sLog->outError(LOG_FILTER_SQL, "Query index (%u) out of range (size: %u) for prepared statement", uint32(index), (uint32)m_queries.size());
TC_LOG_ERROR(LOG_FILTER_SQL, "Query index (%u) out of range (size: %u) for prepared statement", uint32(index), (uint32)m_queries.size());
return false;
}