LogTextEx Method for LCSession

This method adds a new external extended entry to the log for this activity.

This Log method logs an external extended error or event; use LogText for external basic logs and Log or LogEx for IBM® Lotus Enterprise Integrator® (LEI) errors. When logging an error, the activity status is set, placing the activity into an error state. A message is composed from the external text, code, and additional parameters, and is added to any Log entry for this activity.

Defined In

LCSession Class

Syntax

lcSession. LogTextEx (logFlags, text, externalCode, int1, int2, int3, text1, text2, text3)

Parameters

Parameter

Description

logFlags

Long. Flags which affect his long entry.

LCLOGSTREAMF_EVENT Log a non-error event.

text

String. External log text. See Usage.

externalCode

Long. External log code.

int1

Long. Optional extended parameters. See Usage

int2

Long. Optional extended parameters. See Usage

int3

Long. Optional extended parameters. See Usage.

text1

String. Optional extended parameters. See Usage.

text2

String. Optional extended parameters. See Usage.

text3

String. Optional extended parameters. See Usage.

Usage

The text in text for extended logs contains parameter substitution markers which indicate placement and formatting of extended parameters. These substitution markers are of the format "[[Lcxx]]", where "xx" can be any of the following values:

In Integer value, from parameter Int<n>

Tn Type constant LCTYPE_XXX, from parameter Int<n>

Pn Property token, from parameter Int<n>

On Object constant LCOBJECT_XXX, from parameter Int<n>

Sn Stream text, from parameter text<n>

X Stop indicator if all extended parameters are zero/null/empty

X( Left bound to remove if next parameter is zero/null/empty

X) Right bound to remove if next parameter is zero/null/empty

The method of variable substitution allows for relatively complex multiple-parameter log text, as well as grammar variations between languages. The following examples are the actual LEI resources for three extended status values to demonstrate how this formatting is used:

Value

Description

LCFAIL_DUPLICATE

"Duplicate object[[LCX]] '[[LCS1]]'".

LCFAIL_INVALID_METADATA

"Metadata object [[LCX(]]'[[LCS1]]' [[LCX)]]does not exist".

LCFAIL_TYPE_MISMATCH

"Type mismatch[[LCX(]] for field '[[LCS1]]'[[LCX)]][[LCX(]]; LEI: [[LCT1]][[LCX)]][[LCX(]], Database: [[LCT2]][[LCX)]]"