summaryrefslogtreecommitdiffstats
path: root/src/loggerEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/loggerEngine.cpp')
-rw-r--r--src/loggerEngine.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/loggerEngine.cpp b/src/loggerEngine.cpp
index 004c268..9121af5 100644
--- a/src/loggerEngine.cpp
+++ b/src/loggerEngine.cpp
@@ -1,8 +1,8 @@
#include "loggerEngine.h"
-/*****************************************************************************************************
- Custom Logger Engine for debugging on framebuffer
-*****************************************************************************************************/
+// --------------------------------------------------------------------------------------------------
+// Custom Logger Engine for debugging on framebuffer
+//---------------------------------------------------------------------------------------------------
loggerEngine_fb::loggerEngine_fb(QTextEdit *parent) : QxtLoggerEngine(){
// TODO: silly parent storing ... to change!
_debugConsole = parent;
@@ -28,8 +28,7 @@ bool loggerEngine_fb::isInitialized() const{
}
void loggerEngine_fb::writeFormatted(QxtLogger::LogLevel level, const QList<QVariant> & msgs){
- /* TODO: handle different log levels */
- /* write the messages to the debug console */
+ // TODO: handle different log levels
if (msgs.isEmpty()) return;
Q_FOREACH(const QVariant& out, msgs)
{
@@ -37,14 +36,14 @@ void loggerEngine_fb::writeFormatted(QxtLogger::LogLevel level, const QList<QVar
_debugConsole->insertPlainText(out.toString());
}
_debugConsole->insertPlainText(QString("\n"));
- /* move to end of the document */
+ // autoscroll
QTextCursor c = _debugConsole->textCursor();
c.movePosition(QTextCursor::End);
_debugConsole->setTextCursor(c);
}
-/*****************************************************************************************************
- Modified QxtBasicSTDLoggerEngine
-*****************************************************************************************************/
+//---------------------------------------------------------------------------------------------------
+// Modified QxtBasicSTDLoggerEngine
+//---------------------------------------------------------------------------------------------------
loggerEngine_std::loggerEngine_std() : QxtBasicSTDLoggerEngine(){}
loggerEngine_std::~loggerEngine_std(){}
@@ -63,15 +62,6 @@ void loggerEngine_std::writeToStdErr(const QString& str_level, const QList<QVari
*errstream << endl;
}
void loggerEngine_std::writeToStdOut(const QString& level, const QList<QVariant> & msgs){
- if (msgs.isEmpty()) return;
- QString header = '[' + QTime::currentTime().toString("hh:mm:ss.zzz") + "] [" + level + "] ";
- QTextStream* outstream = stdOutStream();
- Q_ASSERT(outstream);
- *outstream << header;
- Q_FOREACH(const QVariant& out, msgs){
- if (!out.isNull()){
- *outstream << out.toString();
- }
- }
- *outstream << endl;
+ // reimplementing this is needed for compiling,
+ // we only need write to std::err, so this function is not needed
}