Skip to main content
Skip table of contents

report() Function

Syntax

report(domain, state, description, parameter, timestamp);
report(domain, state, description, details);

Semantics

Use the report() function to write log messages into the transaction log file of the xUML service. The logged information is usable for all kinds of purposes, such as e.g. performance measurements or statistical evaluations. The report() function provides the same functionality as the Logger Adapter Reference.

The transaction log level of the xUML service must be at least set to Custom to be able to log to the transaction log.

Substitutables

domain

String literal defining an error domain.

state

Boolean, true or false: This will result in setting the status field in the log entry to OK respectively ERROR.

description

String literal containing a log message.

parameter

String literal containing an additional custom message. You can either log a parameter string or a details object.

timestamp

A custom timestamp. This parameter is optional. If it is not given, the timestamp in the transaction log will be generated from the current timestamp.

timestamp and details are mutual exclusive: You cannot provide a custom timestamp when providing a details object.
In this case, the custom timestamp will be overwritten by the actual date and time.

details

Object of complex type (class or array) that contains additional details. The contents of this object will be flattened and logged instead of parameter.

Examples

Error Detail Object:

CODE
{
  "element": "YY-2388",
  "value": "Connector"
}

Report Statement With Custom Timestamp:

NONE
report("Stock_Synchronization", true, "Synchronization started.", "Item: YY-2388", myTimestamp);

... OK Stock_Synchronization CUSTOM Synchronization started. Item: YY-2388

Report Statement With Error Detail Object:

NONE
report("Stock_Synchronization", true, "Synchronization started.", errorDetail);

... OK Stock_Synchronization CUSTOM Synchronization started. e2e:type='ErrorDetail', element='YY-2388', value='Connector'

Report With Error Detail Array:

... e2e:type='ErrorDetail' , [0].element='YY-2388', [0].value='Connector', [1].element='YZ-1222', [1].value='Adapter'

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.