Index: sources/storage/logger.h =================================================================== diff -u -rb9c5b0b3afc3b34d4980ecc4f023f498f80dafbc -r415f3e16ff6e572c8ce7e7b3576e82ce8b44c6ce --- sources/storage/logger.h (.../logger.h) (revision b9c5b0b3afc3b34d4980ecc4f023f498f80dafbc) +++ sources/storage/logger.h (.../logger.h) (revision 415f3e16ff6e572c8ce7e7b3576e82ce8b44c6ce) @@ -28,21 +28,25 @@ #define LOG_EVENT(vCONTENT) emit Storage::Logger::I().didLog(vCONTENT, Storage::Logger::LogType::eLogEvent) #define LOG_ERROR(vCONTENT) emit Storage::Logger::I().didLog(vCONTENT, Storage::Logger::LogType::eLogError) #define LOG_DATUM(vCONTENT) emit Storage::Logger::I().didLog(vCONTENT, Storage::Logger::LogType::eLogDatum) +#define LOG_EXPORT _Logger.concurrentExport() // forward declarations class tst_logging; namespace Storage { /*! - * \brief The Logger class - * + * \brief The Logger class + * \details Main logger class that has all the required implementation for logging. + * The provided interface is the LOG_DATUM, LOG_EVENT, LOG_ERROR, LOG_EXPORT defines + * and no other methods. + * This should have it's own thread. * \note - * PLEASE BE CAREFUL THIS CLASS IS USING QtConcurrent::run - * IT MEANS ANY OTHER CALL WILL BE DONE IN MAIN THREAD + * PLEASE BE CAREFUL THIS CLASS IS USING QtConcurrent::run FOR THE EXPORT LOG FILES. * AND ONLY PRIVATE VOID LOG (,) IS CALLING IN POOLED THREAD - * PLEASE BE VERY CAREFUL AND DO NOT ADD SIGNAL/SLOTS OR ANY OTHER FUNCTION CALLS. - * ALL THE OTHER CLASSES TO USE THIS CLASS SHOULD ONLY USE LOG_DATUM, LOG_EVENT, LOG_ERROR TO LOG + * PLEASE BE VERY CAREFUL. + * ALL THE OTHER CLASSES TO USE THIS CLASS SHOULD ONLY USE LOG_DATUM, LOG_EVENT, LOG_ERROR + * TO DO THE LOGGING */ class Logger : public QObject { @@ -115,6 +119,10 @@ private slots: void onExport(); signals: + /*! + * \brief didExport + * \details notifies the UI when the export is done. + */ void didExport(); // ----- logging structure @@ -123,6 +131,12 @@ private: void log (const QString &vContent, LogType vLogType); signals: + /*! + * \brief didLog + * \details Notifies the logger on a request for log + * \param vContent - content as type of string to be logged + * \param vLogType - the type of logging of type Storage::Logger::LogType + */ void didLog (const QString &vContent, LogType vLogType); };