TLogger
Implements logging for Indy Tunnel components.
Unit
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.
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.
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.
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.
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.