Indy 9
TLogger
Hierarchy, Properties, Methods, Unit: IdTunnelCommon
Implements logging for Indy Tunnel components.
TLogger = class(TObject)
Unit
IdTunnelCommon
Description
TLogger is a class used to provide support for message and status logging in TIdTunnelMaster and TIdTunnelSalve components. TLogger allows messages to be written to a file, and protects resources to prevent simultaneous access by multiple threads in the Indy Tunnel components.

TLogger.Active
TLogger
Indicates that the logging component has been opened.
property Active: Boolean;
Description
Active is a Boolean property that indicates when the logging component has been opened, and the out file has been assigned.

TLogger.Create
TLogger
Constructor for the object instance.
constructor Create(LogFileName: String);
Parameters
LogFileName: String
File used for logging messages and events.
Description
Create is the constructor for the object instance. Create sets Active to False, and attempts Assign and Rewrite the file specified in LogFileName. If the file is successfully opened, Active is set to True.

TLogger.Destroy
TLogger
destructor for the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the object instance. Destroy closes the output file in LogFile and calls the inherited Destroy method.

TLogger.LogEvent
TLogger
Writes a message to the output file.
procedure LogEvent(Msg: String);
Parameters
Msg: String
Message to write to the output file.
Description
LogEvent is a procedure used to write the message specified in Msg to the LogFile output file.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.