diff --git a/src/core/log.cpp b/src/core/log.cpp index 82639da..9b50687 100644 --- a/src/core/log.cpp +++ b/src/core/log.cpp @@ -30,7 +30,6 @@ class Loger { public: static int s_debugLevel; -static QTextStream s_textStream; @@ -74,15 +73,10 @@ static inline QTextStream &logFile() return *s_out; } -static inline QTextStream &outStream() -{ - return s_textStream; -} }; int Loger::s_debugLevel = -1; -QTextStream Loger::s_textStream(stdout); SnoreLog::SnoreLog(SnoreDebugLevels lvl): QDebug(&m_msg), @@ -99,8 +93,7 @@ SnoreLog::~SnoreLog() } if(Loger::debugLvl() >= m_lvl) { - Loger::outStream() << m_msg << "\n"; - Loger::outStream().flush(); + std::cout << m_msg.toLatin1().constData() << std::endl; } } @@ -108,8 +101,3 @@ void SnoreLog::setDebugLvl(int i) { Loger::s_debugLevel = i; } - -void SnoreLog::setOutputDevice(QIODevice *device) -{ - Loger::s_textStream.setDevice(device); -} diff --git a/src/core/log.h b/src/core/log.h index 2ca4773..3e228e5 100644 --- a/src/core/log.h +++ b/src/core/log.h @@ -90,12 +90,6 @@ public: */ static void setDebugLvl(int lvl); - /** - * Sets the output device, the default is stdout - * @param device the output device - */ - static void setOutputDevice(QIODevice *device); - private: SnoreDebugLevels m_lvl; QString m_msg;