"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/common/Logger.h" between
ssr-0.4.0.tar.gz and ssr-0.4.1.tar.gz

About: SimpleScreenRecorder is a screen (video-audio) recorder for Linux.

Logger.h  (ssr-0.4.0):Logger.h  (ssr-0.4.1)
skipping to change at line 30 skipping to change at line 30
#pragma once #pragma once
#include "Global.h" #include "Global.h"
class Logger : public QObject { class Logger : public QObject {
Q_OBJECT Q_OBJECT
public: public:
enum enum_type { enum enum_type {
TYPE_INFO, TYPE_INFO,
TYPE_WARNING, TYPE_WARNING,
TYPE_ERROR TYPE_ERROR,
TYPE_STDERR
}; };
private: private:
std::mutex m_mutex; std::mutex m_mutex;
QFile m_log_file;
std::thread m_capture_thread;
int m_capture_pipe[2], m_shutdown_pipe[2], m_original_stderr;
static Logger *s_instance; static Logger *s_instance;
public: public:
Logger(); Logger();
~Logger(); ~Logger();
void SetLogFile(const QString& filename);
// These functions are thread-safe. // These functions are thread-safe.
static void LogInfo(const QString& str); static void LogInfo(const QString& str);
static void LogWarning(const QString& str); static void LogWarning(const QString& str);
static void LogError(const QString& str); static void LogError(const QString& str);
inline static Logger* GetInstance() { assert(s_instance != NULL); return s_instance; } inline static Logger* GetInstance() { assert(s_instance != NULL); return s_instance; }
signals: signals:
void NewLine(Logger::enum_type type, QString str); void NewLine(Logger::enum_type type, QString str);
private:
void Init();
void Free();
void CaptureThread();
}; };
Q_DECLARE_METATYPE(Logger::enum_type) Q_DECLARE_METATYPE(Logger::enum_type)
 End of changes. 4 change blocks. 
1 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)