TreeFrogFramework  1.29
Public Member Functions | List of all members
TFileAioLogger Class Reference

#include <tfileaiologger.h>

Inheritance diagram for TFileAioLogger:
Inheritance graph
[legend]
Collaboration diagram for TFileAioLogger:
Collaboration graph
[legend]

Public Member Functions

 TFileAioLogger ()
 
 ~TFileAioLogger ()
 
QString key () const
 
bool isMultiProcessSafe () const
 
bool open ()
 
void close ()
 
bool isOpen () const
 
void log (const TLog &log)
 
void log (const QByteArray &msg)
 
void flush ()
 
void setFileName (const QString &name)
 
- Public Member Functions inherited from TLogger
 TLogger ()
 
virtual ~TLogger ()
 
virtual QByteArray logToByteArray (const TLog &log) const
 
const QByteArray & layout () const
 
const QByteArray & dateTimeFormat () const
 
Tf::LogPriority threshold () const
 
const QString & target () const
 

Additional Inherited Members

- Static Public Member Functions inherited from TLogger
static QByteArray logToByteArray (const TLog &log, const QByteArray &layout, const QByteArray &dateTimeFormat, QTextCodec *codec=0)
 
static QByteArray priorityToString (Tf::LogPriority priority)
 
- Protected Member Functions inherited from TLogger
QTextCodec * codec () const
 
QVariant settingsValue (const QString &key, const QVariant &defaultValue=QVariant()) const
 

Detailed Description

The TFileAioLogger class provides asynchronous logging functionality to a log file.

Constructor & Destructor Documentation

◆ TFileAioLogger()

TFileAioLogger::TFileAioLogger ( )

Constructor.

◆ ~TFileAioLogger()

TFileAioLogger::~TFileAioLogger ( )

Member Function Documentation

◆ close()

void TFileAioLogger::close ( )
virtual

Closes the device. This function should be called from any reimplementations of close().

Implements TLogger.

◆ flush()

void TFileAioLogger::flush ( )
virtual

Flushes any buffered data to the device. This function should be called from any reimplementations of flush().

Reimplemented from TLogger.

◆ isMultiProcessSafe()

bool TFileAioLogger::isMultiProcessSafe ( ) const
inlinevirtual

Returns true if the implementation is guaranteed to be free of race conditions when accessed by multiple processes simultaneously; otherwise returns false.

Implements TLogger.

◆ isOpen()

bool TFileAioLogger::isOpen ( ) const
virtual

Returns true if the device is open; otherwise returns false. This function should be called from any reimplementations of isOpen().

Implements TLogger.

◆ key()

QString TFileAioLogger::key ( ) const
inlinevirtual

Returns a key that this logger plugin supports.

Implements TLogger.

◆ log() [1/2]

void TFileAioLogger::log ( const QByteArray &  msg)
virtual

Reimplemented from TLogger.

◆ log() [2/2]

void TFileAioLogger::log ( const TLog log)
virtual

Writes the log log to the device. This function should be called from any reimplementations of log().

Implements TLogger.

◆ open()

bool TFileAioLogger::open ( )
virtual

Opens the device for logging. Returns true if successful; otherwise returns false. This function should be called from any reimplementations of open().

Implements TLogger.

◆ setFileName()

void TFileAioLogger::setFileName ( const QString &  name)

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