WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
ZblLogOutput.cpp
Go to the documentation of this file.
1 #include "ZblLogOutput.h"
2 #include <QSettings>
3 #include <iostream>
4 
5 namespace Zbl
6 {
7 
9 {
10  return QString();
11 }
12 
13 
15  : ZblLogOutput(parent)
16 {
17 
18 }
19 
20 void ZblLogToText::updateLogProfileParameters(const QString& profilePath)
21 {
22 
23 }
24 
26 {
27 
28 #if 0
29  std::cout << formatTextMessage(logMsg).toUtf8().constData()
30  << std::endl;
31 #endif
32 
33 }
34 
36  : ZblLogToText(parent)
37 {
38 
39 }
40 
41 void ZblLogToStdout::updateLogProfileParameters(const QString& profilePath)
42 {
43 
44 }
45 
46 #if 0
48 {
49  std::cout << formatTextMessage(logMsg).toUtf8().constData()
50  << std::endl;
51 
52 }
53 #endif
54 
56  : ZblLogToText(parent)
57 {
58 
59 }
60 
61 
62 void ZblLogToTextFile::updateLogProfileParameters(const QString& profilePath)
63 {
64 
65 }
66 
67 #if 0
69 {
70 
71 }
72 #endif
73 
74 void ZblLogToTextFile::open(const QString& filePath)
75 {
76 
77 }
78 
80 {
81 
82 }
83 
85 {
86  return 0;
87 }
88 
90 {
91 
92 }
93 
95  : ZblLogOutput(parent)
96 {
97 
98 }
99 
100 void ZblLogToHistory::updateLogProfileParameters(const QString& profilePath)
101 {
102 
103 }
104 
106 {
107 
108 }
109 
111  : ZblLogOutput(parent)
112 {
113 
114 }
115 
117 {
118  QSettings profile;
119 
120 }
121 
123 {
124  QString msgBuffer;
125 
126  QTextStream str(&msgBuffer);
127 
128  switch (msg.m_msgType) {
129  case QtDebugMsg:
130  //str << "\nDebug#";
131  break;
132  case QtWarningMsg:
133  str << "WARNING: ";
134  break;
135  case QtCriticalMsg:
136  str << "CRITICAL: ";
137  break;
138  case QtFatalMsg:
139  str << "FATAL ERROR: ";
140  break;
141  }
142 
143  str << msg.m_category << ": " << msg.m_text;
144 
145 #if 0
146 
147  if(m_logParam.m_enableDetails)
148  str << "\n>line: " << msg.m_line
149  << " >file: " << msg.m_file
150  << " >function: " << msg.m_function
151  << " >record: " << m_nextRecordNumber
152  << " >source: " << m_logSource;
153 
154 #endif
155 
156  return msgBuffer;
157 }
158 
160  : ZblLogOutput(parent)
161 {
162 
163 }
164 
166 {
167 
168 }
169 
171 {
172  return QString();
173 }
174 
175 
176 }; // Zbl
virtual qlonglong size()
virtual void updateLogProfileParameters(const QString &profilePath)
virtual void updateLogProfileParameters(const QString &profilePath)
ZblLogFormatJSONRecords(QObject *parent=nullptr)
virtual void updateLogProfileParameters(const QString &profilePath)
virtual QString formatLogMessage(const ZblLogMessage &msg)
ZblLogToText(QObject *parent=nullptr)
virtual void close()
virtual void updateLogProfileParameters(const QString &profilePath)
QString getMetadata()
Definition: ZblLogOutput.cpp:8
virtual void sendLogMessage(const ZblLogMessage &msg)
virtual void open(const QString &filePath)
virtual void updateLogProfileParameters(const QString &profilePath)
Definition: ZAndGate.cpp:6
Abstract base class for Zuble log output modules.
Definition: ZblLogOutput.h:54
ZblLogToStdout(QObject *parent=nullptr)
virtual void sendLogMessage(const ZblLogMessage &msg)
virtual void flush()
virtual void updateLogProfileParameters(const QString &profilePath)
ZblLogToTextFile(QObject *parent=nullptr)
virtual QString formatLogMessage(const ZblLogMessage &msg)
ZblLogToHistory(QObject *parent=nullptr)
ZblLogFormatPlainText(QObject *parent=nullptr)
This class is used to transfer log messages between threads.
Definition: ZblLogMessage.h:38