Description

Writes a custom message to a log file, Please see Log Files for more information.

Syntax

Sub WriteLog(LogIdentifier As Object, Message As Object)

Parameters

Name

Data Type

Description

LogIdentifier

String or TypedValue

Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID.

Message

Object

A String or Object to write to the log file. If an object is specified, it must be convertible to String.

Return

No return value. 

Example

'create Pentagon DOCS Script Library object

Set scriptLib = GetExtensionObject("PentagonDOCS.Core.ScriptLibrary")


'write to log

scriptLib.WriteLog ActivityID, "Message 1"

scriptLib.WriteLog ActivityID, "Message 2"

scriptLib.WriteLog ActivityID, "Message 3"


The resulting log file would contain the following information:

01/01/2019 09:00:00:8802 - Message 1

01/01/2019 09:00:00:8922 - Message 2

01/01/2019 09:00:00:8932 - Message 3