2018-09-14 08:41:52 -05:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
2020-01-02 08:43:50 -06:00
|
|
|
// Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
2018-09-14 08:41:52 -05:00
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
// Logger.h - Logger Utility
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef LOGGER_H
|
|
|
|
#define LOGGER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2018-12-06 04:17:47 -06:00
|
|
|
#include <QFile>
|
2018-09-14 08:41:52 -05:00
|
|
|
|
|
|
|
class Logger : public QObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static Logger* GetLogger();
|
|
|
|
static void ReleaseLogger();
|
|
|
|
void Log(const QString& sMessage);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Logger();
|
|
|
|
virtual ~Logger();
|
|
|
|
|
|
|
|
private:
|
|
|
|
static Logger* m_pThis;
|
|
|
|
static QString m_sFileName;
|
|
|
|
static QFile *m_Logfile;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LOGGER_H
|