Core/Logging: Fixed remaining uses of STRING_VIEW_FMT in log statements

This commit is contained in:
Shauren
2023-01-10 19:12:00 +01:00
parent 0b948b758f
commit eab14dc66a
2 changed files with 6 additions and 6 deletions

View File

@@ -129,12 +129,12 @@ static int CreateChildProcess(T waiter, std::string const& executable,
auto outInfo = MakeTCLogSink([&](std::string_view msg)
{
TC_LOG_INFO(logger, STRING_VIEW_FMT, STRING_VIEW_FMT_ARG(msg));
TC_LOG_INFO(logger, "{}", msg);
});
auto outError = MakeTCLogSink([&](std::string_view msg)
{
TC_LOG_ERROR(logger, STRING_VIEW_FMT, STRING_VIEW_FMT_ARG(msg));
TC_LOG_ERROR(logger, "{}", msg);
});
copy(outStream, outInfo);

View File

@@ -97,7 +97,7 @@ static ChatSubCommandMap COMMAND_MAP;
}
else
{
TC_LOG_ERROR("sql.sql", "Table `command` contains data for non-existant command '" STRING_VIEW_FMT "'. Skipped.", STRING_VIEW_FMT_ARG(name));
TC_LOG_ERROR("sql.sql", "Table `command` contains data for non-existant command '{}'. Skipped.", name);
cmd = nullptr;
break;
}
@@ -107,12 +107,12 @@ static ChatSubCommandMap COMMAND_MAP;
continue;
if (std::holds_alternative<std::string>(cmd->_help))
TC_LOG_ERROR("sql.sql", "Table `command` contains duplicate data for command '" STRING_VIEW_FMT "'. Skipped.", STRING_VIEW_FMT_ARG(name));
TC_LOG_ERROR("sql.sql", "Table `command` contains duplicate data for command '{}'. Skipped.", name);
if (std::holds_alternative<std::monostate>(cmd->_help))
cmd->_help.emplace<std::string>(help);
else
TC_LOG_ERROR("sql.sql", "Table `command` contains legacy help text for command '" STRING_VIEW_FMT "', which uses `trinity_string`. Skipped.", STRING_VIEW_FMT_ARG(name));
TC_LOG_ERROR("sql.sql", "Table `command` contains legacy help text for command '{}', which uses `trinity_string`. Skipped.", name);
} while (result->NextRow());
}
@@ -123,7 +123,7 @@ static ChatSubCommandMap COMMAND_MAP;
void Trinity::Impl::ChatCommands::ChatCommandNode::ResolveNames(std::string name)
{
if (_invoker && std::holds_alternative<std::monostate>(_help))
TC_LOG_WARN("sql.sql", "Table `command` is missing help text for command '" STRING_VIEW_FMT "'.", STRING_VIEW_FMT_ARG(name));
TC_LOG_WARN("sql.sql", "Table `command` is missing help text for command '{}'.", name);
_name = name;
for (auto& [subToken, cmd] : _subCommands)