24#ifdef TF_HAVE_STD_FORMAT
26template<
typename... Args>
27void traceQueryLog(
int duration,
const std::format_string<Args...> &fmt, Args&&... args)
29 auto msg = std::format(fmt, std::forward<Args>(args)...);
30 traceQuery(duration, QByteArray::fromStdString(msg));
35template<
typename... Args>
36void traceQueryLog(
int duration,
const std::string &fmt, Args&&... args)
38 auto msg = Tf::simple_format(std::string(fmt), std::forward<Args>(args)...);
56#ifdef TF_HAVE_STD_FORMAT
58template<
typename... Args>
59void tSystemError(
const std::format_string<Args...> &fmt, Args&&... args)
61 std::string msg = std::format(fmt, std::forward<Args>(args)...);
65template<
typename... Args>
66void tSystemWarn(
const std::format_string<Args...> &fmt, Args&&... args)
68 std::string msg = std::format(fmt, std::forward<Args>(args)...);
72template<
typename... Args>
73void tSystemInfo(
const std::format_string<Args...> &fmt, Args&&... args)
75 auto msg = std::format(fmt, std::forward<Args>(args)...);
81template<
typename... Args>
84 auto msg = Tf::simple_format(std::string(fmt), std::forward<Args>(args)...);
88template<
typename... Args>
89void tSystemWarn(
const std::string &fmt, Args&&... args)
91 auto msg = Tf::simple_format(std::string(fmt), std::forward<Args>(args)...);
95template<
typename... Args>
96void tSystemInfo(
const std::string &fmt, Args&&... args)
98 auto msg = Tf::simple_format(std::string(fmt), std::forward<Args>(args)...);
105#ifdef TF_HAVE_STD_FORMAT
107template<
typename... Args>
108void tSystemDebug(
const std::format_string<Args...> &fmt, Args&&... args)
110 auto msg = std::format(fmt, std::forward<Args>(args)...);
114template<
typename... Args>
115void tSystemTrace(
const std::format_string<Args...> &fmt, Args&&... args)
117 auto msg = std::format(fmt, std::forward<Args>(args)...);
123template<
typename... Args>
124void tSystemDebug(
const std::string &fmt, Args&&... args)
126 auto msg = Tf::simple_format(std::string(fmt), std::forward<Args>(args)...);
130template<
typename... Args>
131void tSystemTrace(
const std::string &fmt, Args&&... args)
133 auto msg = Tf::simple_format(std::string(fmt), std::forward<Args>(args)...);
140template<
typename... Args>
144template<
typename... Args>
The Tf namespace contains miscellaneous identifiers used throughout the library of TreeFrog Framework...
Definition tdebug.h:10
T_CORE_EXPORT void releaseSystemLogger()
Definition tsystemglobal.cpp:78
T_CORE_EXPORT void tSystemMessage(int priority, const QByteArray &message)
Definition tsystemglobal.cpp:37
void error(const std::format_string< Args... > &fmt, Args &&... args)
Outputs the error message to the log file, formatting args according to the format string fmt.
Definition tglobal.h:248
T_CORE_EXPORT void setupSystemLogger(TSystemLogger *logger=nullptr)
Definition tsystemglobal.cpp:57
T_CORE_EXPORT QMap< QString, QVariant > settingsToMap(QSettings &settings, const QString &env=QString())
Definition tsystemglobal.cpp:161
void traceQueryLog(int duration, const std::format_string< Args... > &fmt, Args &&... args)
Definition tsystemglobal.h:27
T_CORE_EXPORT void writeAccessLog(const TAccessLog &log)
Definition tsystemglobal.cpp:49
SystemOpCode
Definition tsystemglobal.h:44
@ WebSocketSendBinary
Definition tsystemglobal.h:47
@ WebSocketPublishText
Definition tsystemglobal.h:48
@ WebSocketPublishBinary
Definition tsystemglobal.h:49
@ WebSocketSendText
Definition tsystemglobal.h:46
@ InvalidOpCode
Definition tsystemglobal.h:45
@ MaxOpCode
Definition tsystemglobal.h:50
@ TraceLevel
Finer-grained informational events than the DEBUG.
Definition tfnamespace.h:236
@ WarnLevel
Potentially harmful situations.
Definition tfnamespace.h:233
@ DebugLevel
Informational events that are most useful to debug the app.
Definition tfnamespace.h:235
@ InfoLevel
Informational messages that highlight the progress of the app.
Definition tfnamespace.h:234
@ ErrorLevel
Error events that might still allow the app to continue running.
Definition tfnamespace.h:232
T_CORE_EXPORT void writeQueryLog(const QString &query, bool success, const QSqlError &error, int duration)
Definition tsystemglobal.cpp:144
T_CORE_EXPORT void releaseQueryLogger()
Definition tsystemglobal.cpp:127
T_CORE_EXPORT void releaseAccessLogger()
Definition tsystemglobal.cpp:101
T_CORE_EXPORT void traceQuery(int duration, const QByteArray &msg)
Definition tsystemglobal.cpp:134
T_CORE_EXPORT void setupAccessLogger()
Definition tsystemglobal.cpp:88
T_CORE_EXPORT bool isAccessLoggerAvailable()
Definition tsystemglobal.cpp:108
T_CORE_EXPORT void setupQueryLogger()
Definition tsystemglobal.cpp:114
#define T_CORE_EXPORT
Definition tdeclexport.h:28
void tSystemTrace(const std::format_string< Args... > &fmt, Args &&... args)
Definition tsystemglobal.h:115
void tSystemInfo(const std::format_string< Args... > &fmt, Args &&... args)
Definition tsystemglobal.h:73
void tSystemDebug(const std::format_string< Args... > &fmt, Args &&... args)
Definition tsystemglobal.h:108
void tSystemError(const std::format_string< Args... > &fmt, Args &&... args)
Definition tsystemglobal.h:59
void tSystemWarn(const std::format_string< Args... > &fmt, Args &&... args)
Definition tsystemglobal.h:66