TreeFrogFramework  2.8
tsystemglobal.h
Go to the documentation of this file.
1 #pragma once
2 #include <QMap>
3 #include <QSettings>
4 #include <QVariant>
5 #include <TGlobal>
6 
7 class TSystemLogger;
8 class TAccessLog;
9 class QSqlError;
10 
11 namespace Tf {
12 T_CORE_EXPORT void setupSystemLogger(TSystemLogger *logger = nullptr); // internal use
13 T_CORE_EXPORT void releaseSystemLogger(); // internal use
14 T_CORE_EXPORT void setupAccessLogger(); // internal use
15 T_CORE_EXPORT void releaseAccessLogger(); // internal use
16 T_CORE_EXPORT bool isAccessLoggerAvailable(); // internal use
17 T_CORE_EXPORT void setupQueryLogger(); // internal use
18 T_CORE_EXPORT void releaseQueryLogger(); // internal use
19 T_CORE_EXPORT void writeAccessLog(const TAccessLog &log); // write access log
20 T_CORE_EXPORT void writeQueryLog(const QString &query, bool success, const QSqlError &error, int duration);
21 T_CORE_EXPORT void traceQueryLog(int duration, const char *, ...) // SQL query log
22 #if defined(Q_CC_GNU) && !defined(__INSURE__)
23  __attribute__((format(printf, 2, 3)))
24 #endif
25  ;
26 
28  InvalidOpCode = 0x00,
33  MaxOpCode = 0x04,
34 };
35 
36 T_CORE_EXPORT QMap<QString, QVariant> settingsToMap(QSettings &settings, const QString &env = QString());
37 }
38 
39 T_CORE_EXPORT void tSystemError(const char *, ...) // system error message
40 #if defined(Q_CC_GNU) && !defined(__INSURE__)
41  __attribute__((format(printf, 1, 2)))
42 #endif
43  ;
44 
45 T_CORE_EXPORT void tSystemWarn(const char *, ...) // system warn message
46 #if defined(Q_CC_GNU) && !defined(__INSURE__)
47  __attribute__((format(printf, 1, 2)))
48 #endif
49  ;
50 
51 T_CORE_EXPORT void tSystemInfo(const char *, ...) // system info message
52 #if defined(Q_CC_GNU) && !defined(__INSURE__)
53  __attribute__((format(printf, 1, 2)))
54 #endif
55  ;
56 
57 T_CORE_EXPORT void tSystemDebug(const char *, ...) // system debug message
58 #if defined(Q_CC_GNU) && !defined(__INSURE__)
59  __attribute__((format(printf, 1, 2)))
60 #endif
61  ;
62 
63 T_CORE_EXPORT void tSystemTrace(const char *, ...) // system trace message
64 #if defined(Q_CC_GNU) && !defined(__INSURE__)
65  __attribute__((format(printf, 1, 2)))
66 #endif
67  ;
68 
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 setupSystemLogger(TSystemLogger *logger=nullptr)
Definition: tsystemglobal.cpp:57
T_CORE_EXPORT void traceQueryLog(int duration, const char *,...)
Definition: tsystemglobal.cpp:189
T_CORE_EXPORT QMap< QString, QVariant > settingsToMap(QSettings &settings, const QString &env=QString())
Definition: tsystemglobal.cpp:219
T_CORE_EXPORT void writeAccessLog(const TAccessLog &log)
Definition: tsystemglobal.cpp:49
SystemOpCode
Definition: tsystemglobal.h:27
@ WebSocketSendBinary
Definition: tsystemglobal.h:30
@ WebSocketPublishText
Definition: tsystemglobal.h:31
@ WebSocketPublishBinary
Definition: tsystemglobal.h:32
@ WebSocketSendText
Definition: tsystemglobal.h:29
@ InvalidOpCode
Definition: tsystemglobal.h:28
@ MaxOpCode
Definition: tsystemglobal.h:33
T_CORE_EXPORT void writeQueryLog(const QString &query, bool success, const QSqlError &error, int duration)
Definition: tsystemglobal.cpp:202
T_CORE_EXPORT void releaseQueryLogger()
Definition: tsystemglobal.cpp:127
T_CORE_EXPORT void releaseAccessLogger()
Definition: tsystemglobal.cpp:101
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
T_CORE_EXPORT void tSystemTrace(const char *,...)
Definition: tsystemglobal.cpp:171
T_CORE_EXPORT void tSystemWarn(const char *,...)
Definition: tsystemglobal.cpp:143
T_CORE_EXPORT void tSystemInfo(const char *,...)
Definition: tsystemglobal.cpp:152
T_CORE_EXPORT void tSystemDebug(const char *,...)
Definition: tsystemglobal.cpp:162
T_CORE_EXPORT void tSystemError(const char *,...)
Definition: tsystemglobal.cpp:134