39 #include "boost/shared_ptr.hpp"
44 #include <QTextStream>
51 #include "QApplication"
56 class EventProcessingThread :
public QThread
70 qApp->processEvents();
87 QString isoDateFormat(
"yyyy-MM-dd");
88 QString isoDate = QDateTime::currentDateTime().toString(isoDateFormat);
107 mThread.reset(
new EventProcessingThread());
108 mThread->setObjectName(
"org.custusx.resource.core.logger");
137 mLogPath = absoluteLoggingFolderPath;
151 mWorker->installObserver(observer, resend);
157 mWorker->uninstallObserver(observer);
virtual ~EventProcessingThread()
virtual void onEmittedMessage(Message message)
void setLoggingFolder(QString absoluteLoggingFolderPath)
QString getDefaultLogPath() const
void loggingFolderChanged()
boost::shared_ptr< class QThread > mThread
void installObserver(MessageObserverPtr observer, bool resend)
static ProfileManager * getInstance()
returns the only instance of this class
QString getLoggingFolder() const
void emittedMessage(Message message)
emitted for each new message, in addition to writing to observer.
boost::shared_ptr< class MessageObserver > MessageObserverPtr
boost::shared_ptr< class LogThread > LogThreadPtr
QString getSettingsPath()
virtual LogThreadPtr createWorker()=0
void uninstallObserver(MessageObserverPtr observer)