[rocprof-sys] Use fmt APIs to construct strings instead of JOIN (#2643)
## Motivation With the introduction of the new logging system base on `spdlog` library, opportunity shows to replace `timemory` dependent JOIN implementation with `fmt` library `format` and `join` APIs, which are shipped as a part of `spdlog` lib ## Technical Details Use `fmt` provided APIs to properly format and package strings.
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
3318c540ea
commit
956a73c4c8
+7
-3
@@ -33,8 +33,12 @@
|
||||
|
||||
#include "logger/debug.hpp"
|
||||
|
||||
#include <spdlog/fmt/ranges.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <tuple>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace rocprofsys
|
||||
{
|
||||
@@ -64,13 +68,13 @@ invoke_exit_gotcha(const exit_gotcha::gotcha_data& _data, FuncT _func, Args... _
|
||||
if(get_state() < State::Finalized && !is_child_process())
|
||||
{
|
||||
LOG_DEBUG("Finalizing {} before calling {}({})...", get_exe_name(), _data.tool_id,
|
||||
JOIN(", ", _args...).c_str());
|
||||
fmt::join(std::forward_as_tuple(_args...), ", "));
|
||||
|
||||
rocprofsys_finalize();
|
||||
}
|
||||
|
||||
LOG_DEBUG("Calling {}({}) in {}...", _data.tool_id, JOIN(", ", _args...),
|
||||
get_exe_name());
|
||||
LOG_DEBUG("Calling {}({}) in {}...", _data.tool_id,
|
||||
fmt::join(std::forward_as_tuple(_args...), ", "), get_exe_name().c_str());
|
||||
|
||||
if(_exit_info.is_known && _exit_info.exit_code != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user