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 | |
|---|---|---|
| Constructor |
Creates a file target with no file open.
|
|
| Create |
Creates a file target wrapped in a smart pointer.
|
Lifetime methods
| Name | Description | |
|---|---|---|
| Delete |
Deletes the file target.
|
File methods
| Name | Description | |
|---|---|---|
| OpenLogFile |
Opens the target log file.
|
|
| CloseLogFile |
Closes the target log file.
|
|
| FlushAfterWrite |
Sets the severity filter used to flush the file after a write.
|
Logging methods
| Name | Description | |
|---|---|---|
| LogMessage |
Writes a message to the open log file.
|