SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND


Platform::Util
Class FileLog

NonCopyableType
   |
   +-ILog
        |
        +-FileLog

Implemented in:
Platform.Util.Log.h

class FileLog:
public ILog

A file logger.

Inner Compounds, Typedefs, and Enums inherited from class ILogcollapse
Category

Field Summarycollapse
protected mutable Io::File* logFile
          The file object of the log file.
protected Path logPath
          The path to the log file.
Long rotateAfter
          Maximum size of the log file, in bytes.

Fields inherited from class ILogcollapse
filter

Constructor Summarycollapse
FileLog(const Path& path, Io::FileMode mode = Io::FileMode_TruncateOrCreate)
          Creates a file log at the specified location.
~FileLog()
          Destructor.

Method Summarycollapse
protected Void write(Category category, const String& message) const
          Writes a message to the log.

Methods inherited from class ILogcollapse
debug, error, fatal, formatCategory, formatTimestamp, info, trace, warning, write

 

Field Detail

logFile

protected mutable Io::File* logFile

The file object of the log file.


logPath

protected Path logPath

The path to the log file.


rotateAfter

Long rotateAfter

Maximum size of the log file, in bytes. Once a log file reaches the specified limit size it is rotated. That is, the log file is closed, and a new file with the same name and a sequence number suffix is opened for continuous logging.

 

Constructor Detail

FileLog

FileLog(const Path& path, Io::FileMode mode = Io::FileMode_TruncateOrCreate)

Creates a file log at the specified location.

Parameters:
path - location of the log file
mode - the file mode used to open/create/append/truncate the log file

~FileLog

~FileLog()

Destructor.

 

Method Detail

write

protected Void write(Category category, const String& message) const

Writes a message to the log.

Parameters:
category - a message category
message - a message text
Overrides:
ILog::write


SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND