Home -> LogTargetFile

Declaration

class LogTargetFile : public ILogTarget;

Description

The LogTargetFile class is an ILogTarget implementation that writes formatted log messages to a file.

The target must have a file opened with OpenLogFile before messages are written. If no file is open, messages are ignored.

The target flushes after writes whose severity passes the configured flush filter. The default flush filter is SeverityFilter::WarningOrHigher.

Members

Constructors

Name Description
Public member Constructor
Creates a file target with no file open.
Public member Create
Creates a file target wrapped in a smart pointer.

Lifetime methods

Name Description
Public member Delete
Deletes the file target.

File methods

Name Description
Public member OpenLogFile
Opens the target log file.
Public member CloseLogFile
Closes the target log file.
Public member FlushAfterWrite
Sets the severity filter used to flush the file after a write.

Logging methods

Name Description
Public member LogMessage
Writes a message to the open log file.

See also