Here’s a rewritten version of your question:
“I’m trying to create a std::print() wrapper that modifies the output format, such as adding a prefix and suffix around the original format. I was able to achieve this using a macro. How can I improve this approach or implement it differently for more flexibility?”
#define DECORATED_PRINT(fmt, ...) std::println("prefix " fmt " suffix", __VA_ARGS__)