diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
commit | aaa6e73c8ca6d60e943cb964605536eb78219db2 (patch) | |
tree | f5a0187925e646ef071d647efa7a5dac20501813 /src/common/Utilities/StartProcess.cpp | |
parent | 825c697a764017349ca94ecfca8f30a8365666c0 (diff) |
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
(cherry picked from commit d791afae1dfcfaf592326f787755ca32d629e4d3)
Diffstat (limited to 'src/common/Utilities/StartProcess.cpp')
-rw-r--r-- | src/common/Utilities/StartProcess.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/Utilities/StartProcess.cpp b/src/common/Utilities/StartProcess.cpp index 00e5bc0bfe7..dc4fc4e7646 100644 --- a/src/common/Utilities/StartProcess.cpp +++ b/src/common/Utilities/StartProcess.cpp @@ -87,8 +87,8 @@ static int CreateChildProcess(T waiter, std::string const& executable, if (!secure) { - TC_LOG_TRACE(logger, "Starting process \"%s\" with arguments: \"%s\".", - executable.c_str(), boost::algorithm::join(argsVector, " ").c_str()); + TC_LOG_TRACE(logger, "Starting process \"{}\" with arguments: \"{}\".", + executable, boost::algorithm::join(argsVector, " ")); } // prepare file with only read permission (boost process opens with read_write) @@ -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); @@ -146,8 +146,8 @@ static int CreateChildProcess(T waiter, std::string const& executable, if (!secure) { - TC_LOG_TRACE(logger, ">> Process \"%s\" finished with return value %i.", - executable.c_str(), result); + TC_LOG_TRACE(logger, ">> Process \"{}\" finished with return value {}.", + executable, result); } return result; |