Please enable JavaScript to view this site.


void = LogMessage(sMessage)


Use the LogMessage macro function to generate your own run-time messages during the execution of a macro, without interrupting the flow of the macro. The parameter sMessage can be any string literal, variable or expression.


In the macro code below, a call to LogMessage was added to log all occurrences of e-holidays.

bResult =bResult = IsHolidayForList('e', n_TokenDate)
if bResult
    LogMessage('Found an e-Holiday')
sResult = '[' + s_LangDayToken + ']'

These messages can then be viewed in the diary generation messages dialog with other run-time messages.



You do not need to include a lot of context information in sMessage as contextual information (page number, token date, token and original token, if different) is automatically appended to your message, as shown in the example above.


See also: Assert and RaiseError.


Topic 174305, last updated on 19-Apr-2020