@@ -228,41 +228,66 @@ inline bool strcmp(const QByteArray &str1, const QByteArray &str2)
228228#ifdef TF_HAVE_STD_FORMAT // std::format
229229
230230// Logging for developer
231+
232+ /* !
233+ Outputs the fatal message to the log file, formatting \a args according to the format string \a fmt.
234+ \see https://en.cppreference.com/w/cpp/utility/format/format
235+ */
231236template <typename ... Args>
232237void fatal (const std::format_string<Args...> &fmt, Args&&... args)
233238{
234239 std::string msg = std::format (fmt, std::forward<Args>(args)...);
235240 Tf::logging (Tf::FatalLevel, QByteArray::fromStdString (msg));
236241}
237242
243+ /* !
244+ Outputs the error message to the log file, formatting \a args according to the format string \a fmt.
245+ \see https://en.cppreference.com/w/cpp/utility/format/format
246+ */
238247template <typename ... Args>
239248void error (const std::format_string<Args...> &fmt, Args&&... args)
240249{
241250 std::string msg = std::format (fmt, std::forward<Args>(args)...);
242251 Tf::logging (Tf::ErrorLevel, QByteArray::fromStdString (msg));
243252}
244253
254+ /* !
255+ Outputs the warning message to the log file, formatting \a args according to the format string \a fmt.
256+ \see https://en.cppreference.com/w/cpp/utility/format/format
257+ */
245258template <typename ... Args>
246259void warn (const std::format_string<Args...> &fmt, Args&&... args)
247260{
248261 std::string msg = std::format (fmt, std::forward<Args>(args)...);
249262 Tf::logging (Tf::WarnLevel, QByteArray::fromStdString (msg));
250263}
251264
265+ /* !
266+ Outputs the information message to the log file, formatting \a args according to the format string \a fmt.
267+ \see https://en.cppreference.com/w/cpp/utility/format/format
268+ */
252269template <typename ... Args>
253270void info (const std::format_string<Args...> &fmt, Args&&... args)
254271{
255272 std::string msg = std::format (fmt, std::forward<Args>(args)...);
256273 Tf::logging (Tf::InfoLevel, QByteArray::fromStdString (msg));
257274}
258275
276+ /* !
277+ Outputs the debug message to the log file, formatting \a args according to the format string \a fmt.
278+ \see https://en.cppreference.com/w/cpp/utility/format/format
279+ */
259280template <typename ... Args>
260281void debug (const std::format_string<Args...> &fmt, Args&&... args)
261282{
262283 std::string msg = std::format (fmt, std::forward<Args>(args)...);
263284 Tf::logging (Tf::DebugLevel, QByteArray::fromStdString (msg));
264285}
265286
287+ /* !
288+ Outputs the trace message to the log file, formatting \a args according to the format string \a fmt.
289+ \see https://en.cppreference.com/w/cpp/utility/format/format
290+ */
266291template <typename ... Args>
267292void trace (const std::format_string<Args...> &fmt, Args&&... args)
268293{
0 commit comments