2024-06-24 13:23:40 +02:00
|
|
|
/*
|
2024-12-30 22:39:49 +01:00
|
|
|
* Copyright (C) 2024-2025 QuasarApp.
|
2024-06-24 13:23:40 +02:00
|
|
|
* Distributed under the lgplv3 software license, see the accompanying
|
|
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
* of this license document, but changing it is not allowed.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QALOGGER_H
|
|
|
|
#define QALOGGER_H
|
|
|
|
|
|
|
|
#include "quasarapp_global.h"
|
|
|
|
|
2025-02-07 11:56:30 +01:00
|
|
|
#include <QFile>
|
2024-06-24 13:23:40 +02:00
|
|
|
#include <QList>
|
|
|
|
|
|
|
|
namespace QuasarAppUtils {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The QALogger class is logger handler for app.
|
2025-02-07 11:56:30 +01:00
|
|
|
* This class allow to log all message from app to file.
|
2025-02-07 12:00:00 +01:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* @code
|
|
|
|
* #include <qalogger.h>
|
|
|
|
*
|
|
|
|
* QuasarAppUtils::QALogger logger;
|
|
|
|
*
|
|
|
|
* QuasarAppUtils::Params::parseParams(argc, argv);
|
|
|
|
*
|
|
|
|
* logger.init();
|
|
|
|
* @endcode
|
2024-06-24 13:23:40 +02:00
|
|
|
*/
|
|
|
|
class QUASARAPPSHARED_EXPORT QALogger
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
QALogger();
|
2025-02-07 11:56:30 +01:00
|
|
|
~QALogger();
|
2024-06-24 13:23:40 +02:00
|
|
|
|
2024-06-24 13:27:03 +02:00
|
|
|
/**
|
|
|
|
* @brief init This method initialize logging of all qt message into file.
|
2025-02-07 12:00:00 +01:00
|
|
|
* @note This function should be invokae after parsing arguments.
|
|
|
|
* if you invoke this before parsing arguments, verbose level of logs will not created correct.
|
2024-06-24 13:27:03 +02:00
|
|
|
*/
|
2024-06-24 13:23:40 +02:00
|
|
|
void init();
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // QALOGGER_H
|