Class AFileLog
Unit
classwork
Declaration
type AFileLog = class(ALog)
Description
This class represents a log that will log to a file stream. The class expands on what it inherits from ALog by allowing instances of itself to be constructed with the name of a file. The constructor will create the output file stream and assume ownership of it.
Hierarchy
Overview
Methods
|
constructor toFileNamed(const thisName: string; const overwrite: boolean = false); virtual; |
|
function toString: AnsiString; override; |
Description
Methods
|
constructor toFileNamed(const thisName: string; const overwrite: boolean = false); virtual; |
Construct a new instance of AFileLog that will output to the named file. If overwrite is True and the named file already exists, then its contents will be destroyed before the log begins to output. Otherwise, the log will append to the file if it exists, and attempt to create it if it does not.
This method constructs and assumes ownership of an instance of AFileOutputStream.
|
|
function toString: AnsiString; override; |
Construct and return a string representation of the log, suitable for printing to a text-based device, such as a console.
This method overrides the behavior inherited from ALog, which simply prints the display name of the class. Instead, it returns the name of the output file to which items are logged.
|
Generated by PasDoc 0.13.0 on 2015-06-23 19:40:11
|