APGen Documentation Previous Topic: Collection.RemoveAll() Next Topic: Log.Class Parent Topic: APGen Object Reference    APGen Object Reference
Log Object
See Also:

The Log object encapsulates logging functionality, including logging to a file, a stream, or the Windows NT Event Log.

Syntax

Log.[ property | method ]

Properties

Class String Returns the class of the log stream.
Filename String Sets/returns the filename of the log file.
Dir String Sets/returns the directory containing the log file.
Path String Sets/returns the complete path to the log file.
Append True/False Sets/returns whether or not log entries are appended to the end of any existing log file.  The default value is True.
Unicode True/False Sets/returns whether log entries are written in Unicode or ANSI.  The default value is False (ANSI).
Logon Logon object Returns a Logon object that can be used to set the default logon for opening/creating the log file.
Stream IStream Sets/returns the IStream object where log text is written.
Flags ApgLogFlags Sets/returns flags that control logging behavior.

Methods

Write() Adds an entry to the log stream.
LogEvent() Adds an entry to the Windows NT Event Log.

Notes

For more information on logging and using the Logobject, see Logging within APGen.

If a log file cannot be written to (usually due to file permissions or Log.Dir not being a directory), the log entry is written to the system Event Log.

To use the Log object in C++, see the IAPGLog interface in <install dir>\include\APGen.h.