From 5612d107116c217c51fa85d0f343b587b2fb1864 Mon Sep 17 00:00:00 2001 From: santi Date: Tue, 29 Jul 2014 17:25:11 +0200 Subject: [PATCH] ola logging now works. Debug level --- src/olathread.cpp | 8 ++++++-- src/olathread.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/olathread.cpp b/src/olathread.cpp index 52388f4..0172c35 100644 --- a/src/olathread.cpp +++ b/src/olathread.cpp @@ -25,7 +25,11 @@ olaThread::olaThread(QObject *parent) Q_CHECK_PTR(m_clientWrapper); if (!m_clientWrapper->Setup()) { qErrnoWarning("olaThread::olaStart| Failed Setup() in Client Wrapper"); } m_client = m_clientWrapper->GetClient(); - ola::InitLogging(ola::OLA_LOG_INFO , ola::OLA_LOG_STDERR); + if (ola::InitLogging(ola::OLA_LOG_DEBUG , ola::OLA_LOG_STDERR)) { + qDebug() << "Ola logging debug working"; + } else { + qWarning() << "Can not init ola logging"; + } m_client->SetDMXCallback(ola::NewCallback(this, &olaThread::NewDmx)); m_clientWrapper->GetSelectServer()->RegisterRepeatingTimeout(4000, ola::NewCallback(this, &olaThread::CheckDataLoss)); // qDebug() << "Init olaThread"; @@ -101,7 +105,7 @@ bool olaThread::CheckDataLoss() { timersub(&now, &m_last_data, &diff); if (diff.tv_sec > 4 || (diff.tv_sec == 4 && diff.tv_usec > 4000000)) { // loss of data -// qDebug()<< "olaThread| Can not read one or several universes"; + qDebug()<< "olaThread| Can not read one or several universes"; emit toTerminal("olaThread: Can not read one universe"); // return false; // Retorna false para deshabilitar el callback } diff --git a/src/olathread.h b/src/olathread.h index 3e0d589..17cc59d 100644 --- a/src/olathread.h +++ b/src/olathread.h @@ -96,4 +96,6 @@ signals: void layerReceived(int i); }; +using namespace ola; + #endif // OLATHREAD_H