APGen Documentation Previous Topic: Log.Logon Next Topic: Log.Flags Parent Topic: Log Object    Log Object
Log.Stream
See Also:

The Log.Stream property sets/returns the log stream.

Syntax

VBScript:

Log.Stream [= stream]

JScript:

Log.Stream [= stream];

Object

Log The Log object.

Parameters

stream An object that implements the IStream interface.

Notes

In C++, the object returned from Log.Stream can be QueryInterface()ed (using IID_IStream) to return an IStream*.  The IStream interface is described in the Microsoft Win32 SDK documentation.

The object returned by Log.Stream cannot be accessed by scripting languages or Visual Basic, because the IStream interface is not a COM automation interface.

Any stream object passed to Log.Stream must implement the IStream interface.  Otherwise, an error will be raised.

Log.Stream is used for several reasons:

  1. Sharing log output streams between one or more APG scripts.
  2. Sending log output to a non-file repository.  For more information, see Pluggable Streams.
  3. Passing the log stream to a COM object.

When the Log.Stream property is set, the previous log stream is closed.

The Log.Stream property is similar in functionality to the Output.Stream property.  For an example of how to share streams between two scripts, see the Pluggable Streams topic.

Applies To

Log Object