WriteLog
WriteLog Method
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 PentagonDOCS PDF Processor object
Set pdfProcessor = GetExtensionObject("PentagonDOCS.PDFProcessor")
'write to log
pdfProcessor.WriteLog ActivityID, "Message 1"
pdfProcessor.WriteLog ActivityID, "Message 2"
pdfProcessor.WriteLog ActivityID, "Message 3"
The resulting log file would contain the following information:
01/01/2021 09:00:00:8802 - Message 1
01/01/2021 09:00:00:8922 - Message 2
01/01/2021 09:00:00:8932 - Message 3