- Enhanced compression support - Log manager improvements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
844 B
C++
42 lines
844 B
C++
#ifndef LOGMANAGER_H
|
|
#define LOGMANAGER_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <functional>
|
|
|
|
class LogManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static LogManager &instance() {
|
|
static LogManager instance;
|
|
return instance;
|
|
}
|
|
|
|
// Standard logging
|
|
void addEntry(const QString &entry);
|
|
void addError(const QString &error);
|
|
void addLine();
|
|
|
|
// Debug logging - only logs if debug mode enabled
|
|
void debug(const QString &entry);
|
|
|
|
// Set debug mode checker (called from Settings initialization)
|
|
void setDebugChecker(std::function<bool()> checker);
|
|
|
|
signals:
|
|
void entryAdded(const QString &entry);
|
|
|
|
private:
|
|
LogManager() : m_debugChecker(nullptr) {}
|
|
~LogManager() {}
|
|
|
|
std::function<bool()> m_debugChecker;
|
|
|
|
Q_DISABLE_COPY(LogManager)
|
|
};
|
|
|
|
#endif // LOGMANAGER_H
|