General Purpose Geodetic Library
SgGuiLogger Class Reference

#include <SgGuiLogger.h>

Inheritance diagram for SgGuiLogger:
QPlainTextEdit SgLogger

Public Member Functions

 SgGuiLogger (QWidget *, int=100, bool=true, const QString &="logger.log")
 
virtual ~SgGuiLogger ()
 
- Public Member Functions inherited from SgLogger
 SgLogger (int capacity=100, bool isStoreInFile=false, const QString &fileName="logger.log")
 
virtual ~SgLogger ()
 
void setDirName (const QString &dirName)
 
void setFileName (const QString &fileName)
 
void setCapacity (int capacity)
 
void setIsStoreInFile (bool isStoreInFile)
 
void setUseFullDateFormat (bool useFullDateFormat)
 
void setIsNeedTimeMark (bool isNeedTimeMark)
 
void setIsMute (bool is)
 
void setLogFacility (LogLevel lvl, quint32 f)
 
void setFacilitiesSerialNumber (double sn)
 
const QString & getDirName () const
 
const QString & getFileName () const
 
int getCapacity () const
 
bool getIsStoreInFile () const
 
bool getUseFullDateFormat () const
 
bool getIsNeedTimeMark () const
 
bool getIsMute () const
 
quint32 getLogFacility (LogLevel lvl) const
 
double getFacilitiesSerialNumber () const
 
const QList< QString * > & getSpool () const
 
QString className () const
 
void addLogFacility (LogLevel lvl, quint32 f)
 
void delLogFacility (LogLevel lvl, quint32 f)
 
bool isEligible (LogLevel lvl, quint32 f) const
 
virtual void startUp ()
 
virtual void write (LogLevel, quint32, const QString &, bool=false)
 
void attachSupplementLog (const QString &name, SgLogger *auxLogger)
 
void detachSupplementLog (const QString &name)
 
SgLoggerlookupSupplementLog (const QString &name)
 
void rmLogFile ()
 

Protected Member Functions

virtual QString ClassName () const
 
virtual void makeOutput (LogLevel, const QString &, bool)
 
virtual void clearSpool ()
 

Protected Attributes

QTextCharFormat errFormat
 
QTextCharFormat wrnFormat
 
QTextCharFormat infFormat
 
QTextCharFormat dbgFormat
 
- Protected Attributes inherited from SgLogger
bool isStoreInFile_
 
bool isNeedTimeMark_
 
bool useFullDateFormat_
 
bool isMute_
 
QString dirName_
 
QString fileName_
 
QList< QString * > spool_
 
quint32 logFacilities_ [4]
 
int capacity_
 
double facilitiesSerialNumber_
 
QMap< QString, SgLogger * > logSupplements_
 

Additional Inherited Members

- Public Types inherited from SgLogger
enum  LogLevel { ERR , WRN , INF , DBG }
 
enum  LogFacility {
  IO_BIN = 1<< 0 , IO_TXT = 1<< 1 , IO_NCDF = 1<< 2 , IO_DBH = 1<< 3 ,
  IO = IO_BIN | IO_TXT | IO_NCDF | IO_DBH , MATRIX = 1<< 4 , MATRIX3D = 1<< 5 , INTERP = 1<< 6 ,
  MATH_RES_1 = 1<< 7 , MATH = MATRIX | MATRIX3D | INTERP | MATH_RES_1 , OBS = 1<< 8 , STATION = 1<< 9 ,
  SOURCE = 1<<10 , SESSION = 1<<11 , DATA = OBS | STATION | SOURCE | SESSION , REF_FRAME = 1<<12 ,
  TIME = 1<<13 , IONO = 1<<14 , REFRACTION = 1<<15 , DELAY = 1<<16 ,
  RATE = 1<<17 , FLY_BY = 1<<18 , DISPLACEMENT = 1<<19 , GEO_RES_1 = 1<<20 ,
  GEO , ESTIMATOR = 1<<21 , PWL = 1<<22 , STOCH = 1<<23 ,
  CONFIG = 1<<24 , GUI = 1<<25 , REPORT = 1<<26 , RESOURCE = 1<<27 ,
  RUN = 1<<28 , PREPROC = 1<<29 , RESERVED_1 = 1<<30 , RESERVED_2 = 1<<31 ,
  ALL
}
 

Detailed Description

Definition at line 46 of file SgGuiLogger.h.

Constructor & Destructor Documentation

◆ SgGuiLogger()

SgGuiLogger::SgGuiLogger ( QWidget parent,
int  capacity = 100,
bool  isStoreInFile = true,
const QString &  fileName = "logger.log" 
)

Definition at line 36 of file SgGuiLogger.cpp.

References SgLogger::capacity_, dbgFormat, errFormat, infFormat, and wrnFormat.

◆ ~SgGuiLogger()

virtual SgGuiLogger::~SgGuiLogger ( )
inlinevirtual

Definition at line 51 of file SgGuiLogger.h.

Member Function Documentation

◆ ClassName()

virtual QString SgGuiLogger::ClassName ( ) const
inlineprotectedvirtual

Definition at line 58 of file SgGuiLogger.h.

Referenced by clearSpool().

◆ clearSpool()

void SgGuiLogger::clearSpool ( )
protectedvirtual

Reimplemented from SgLogger.

Definition at line 95 of file SgGuiLogger.cpp.

References ClassName(), SgLogger::clearSpool(), SgLogger::DBG, SgLogger::IO_TXT, logger, and SgLogger::write().

◆ makeOutput()

void SgGuiLogger::makeOutput ( LogLevel  level,
const QString &  s,
bool  isAsync 
)
protectedvirtual

Reimplemented from SgLogger.

Definition at line 66 of file SgGuiLogger.cpp.

References SgLogger::DBG, dbgFormat, SgLogger::ERR, errFormat, SgLogger::INF, infFormat, SgLogger::WRN, and wrnFormat.

Member Data Documentation

◆ dbgFormat

QTextCharFormat SgGuiLogger::dbgFormat
protected

Definition at line 56 of file SgGuiLogger.h.

Referenced by SgGuiLogger(), and makeOutput().

◆ errFormat

QTextCharFormat SgGuiLogger::errFormat
protected

Definition at line 53 of file SgGuiLogger.h.

Referenced by SgGuiLogger(), and makeOutput().

◆ infFormat

QTextCharFormat SgGuiLogger::infFormat
protected

Definition at line 55 of file SgGuiLogger.h.

Referenced by SgGuiLogger(), and makeOutput().

◆ wrnFormat

QTextCharFormat SgGuiLogger::wrnFormat
protected

Definition at line 54 of file SgGuiLogger.h.

Referenced by SgGuiLogger(), and makeOutput().


The documentation for this class was generated from the following files: