summaryrefslogtreecommitdiffstats
path: root/src/loggerengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/loggerengine.cpp')
-rw-r--r--src/loggerengine.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/loggerengine.cpp b/src/loggerengine.cpp
index 5638908..4540678 100644
--- a/src/loggerengine.cpp
+++ b/src/loggerengine.cpp
@@ -6,40 +6,43 @@
LoggerEngine_fb::LoggerEngine_fb(QTextEdit *parent) : QxtLoggerEngine(){
// TODO: silly parent storing ... to change!
_debugConsole = parent;
- _initialized = false;
- setLogLevelsEnabled(QxtLogger::DebugLevel);
- enableLogging();
+ //_initialized = false;
+ //setLogLevelsEnabled(QxtLogger::DebugLevel);
+ //enableLogging();
}
LoggerEngine_fb::~LoggerEngine_fb(){}
void LoggerEngine_fb::initLoggerEngine(){
- _initialized = true;
+ //_initialized = true;
return;
}
-void LoggerEngine_fb::killLoggerEngine(){return;}
+void LoggerEngine_fb::killLoggerEngine(){
+ return;
+}
void LoggerEngine_fb::setLogLevelEnabled(QxtLogger::LogLevels level, bool enable){
- QxtLoggerEngine::setLogLevelsEnabled(level, enable);
- if (!enable) QxtLoggerEngine::setLogLevelsEnabled(QxtLogger::DebugLevel);
+ //QxtLoggerEngine::setLogLevelsEnabled(level, enable);
+ //if (!enable) QxtLoggerEngine::setLogLevelsEnabled(QxtLogger::DebugLevel);
}
bool LoggerEngine_fb::isInitialized() const{
- return _initialized;
+ //return _initialized;
}
void LoggerEngine_fb::writeFormatted(QxtLogger::LogLevel level, const QList<QVariant> & msgs){
// TODO: handle different log levels
if (msgs.isEmpty()) return;
- Q_FOREACH(const QVariant& out, msgs)
- {
- if (!out.isNull())
+ if (level == QxtLogger::DebugLevel){
+ Q_FOREACH(const QVariant& out, msgs){
+ if (!out.isNull())
_debugConsole->insertPlainText(out.toString());
+ }
+ _debugConsole->insertPlainText(QString("\n"));
+ // autoscroll
+ QTextCursor c = _debugConsole->textCursor();
+ c.movePosition(QTextCursor::End);
+ _debugConsole->setTextCursor(c);
}
- _debugConsole->insertPlainText(QString("\n"));
- // autoscroll
- QTextCursor c = _debugConsole->textCursor();
- c.movePosition(QTextCursor::End);
- _debugConsole->setTextCursor(c);
}
//---------------------------------------------------------------------------------------------------
// Modified QxtBasicSTDLoggerEngine