diff options
| author | Kargatum <dowlandtop@yandex.com> | 2022-01-27 22:44:41 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-27 16:44:41 +0100 |
| commit | 5969df4e303121cca77166df28aa0e9ff2f17e9f (patch) | |
| tree | af8b4ad44f17854fb0e8eeeb0d4eb387b0715bbf /src/server/database/Database/MySQLPreparedStatement.cpp | |
| parent | 5228d293794bb1137a1f857ade784a39ee460bdd (diff) | |
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
Diffstat (limited to 'src/server/database/Database/MySQLPreparedStatement.cpp')
| -rw-r--r-- | src/server/database/Database/MySQLPreparedStatement.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/database/Database/MySQLPreparedStatement.cpp b/src/server/database/Database/MySQLPreparedStatement.cpp index c29a5e00eb..160cd1fecb 100644 --- a/src/server/database/Database/MySQLPreparedStatement.cpp +++ b/src/server/database/Database/MySQLPreparedStatement.cpp @@ -76,7 +76,7 @@ void MySQLPreparedStatement::BindParameters(PreparedStatementBase* stmt) } #ifdef _DEBUG if (pos < m_paramCount) - LOG_WARN("sql.sql", "[WARNING]: BindParameters() for statement %u did not bind all allocated parameters", stmt->GetIndex()); + LOG_WARN("sql.sql", "[WARNING]: BindParameters() for statement {} did not bind all allocated parameters", stmt->GetIndex()); #endif } @@ -94,7 +94,7 @@ void MySQLPreparedStatement::ClearParameters() static bool ParamenterIndexAssertFail(uint32 stmtIndex, uint8 index, uint32 paramCount) { - LOG_ERROR("sql.driver", "Attempted to bind parameter %u%s on a PreparedStatement %u (statement has only %u parameters)", uint32(index) + 1, (index == 1 ? "st" : (index == 2 ? "nd" : (index == 3 ? "rd" : "nd"))), stmtIndex, paramCount); + LOG_ERROR("sql.driver", "Attempted to bind parameter {}{} on a PreparedStatement {} (statement has only {} parameters)", uint32(index) + 1, (index == 1 ? "st" : (index == 2 ? "nd" : (index == 3 ? "rd" : "nd"))), stmtIndex, paramCount); return false; } @@ -104,7 +104,7 @@ void MySQLPreparedStatement::AssertValidIndex(uint8 index) ASSERT(index < m_paramCount || ParamenterIndexAssertFail(m_stmt->GetIndex(), index, m_paramCount)); if (m_paramsSet[index]) - LOG_ERROR("sql.sql", "[ERROR] Prepared Statement (id: %u) trying to bind value on already bound index (%u).", m_stmt->GetIndex(), index); + LOG_ERROR("sql.sql", "[ERROR] Prepared Statement (id: {}) trying to bind value on already bound index ({}).", m_stmt->GetIndex(), index); } void MySQLPreparedStatement::SetParameter(uint8 index, std::nullptr_t) |
