Altova FlowForce Server 2024 

Converts the expression received as argument to string and writes it to the system log. This function is useful in situations where you want to explicitly log the expression produced by a step. Logging values this way has the effect that no truncation of values occurs in the system log when the logged values are too long, see also Logging Settings.

 

Signature

log(expression:T0) -> string

 

Parameters

Name

Type

Description

expression

T0

The FlowForce expression to be logged, of type T0 (any type).

 

Examples

Let's assume that you have created a job which gets a list of files from the given path, like the one below.

fs_log_function_example_01

If the number of files in the source directory exceeds the FlowForce default logging limit for lists, then entries in the job log become truncated. As illustrated below, in this example, only the first 10 file names are shown. Also, the last character in each file path has been truncated, because the path has exceeded the default limit of 50 characters.

fs_log_function_example_02

To prevent truncation from happening, enclose the expression inside the log function, and save the job configuration.

fs_log_function_example_03

If you run the job with the new configuration, the log now contains a new entry for the logged expression, in addition to the entry logged by the system. Truncation no longer occurs.

fs_log_function_example_04

In this example, as an alternative to calling the log expression function, you can also click the "Enable logging" ff_ic_log button next to the step parameter you wish to log. Doing this is equivalent to using the log function, so FlowForce will hide the log function next time when you open the job configuration page. The difference between the ff_ic_log button and the log function is that the former logs the entire expression displayed in the text box, whereas the log function can be used selectively for smaller sub-expressions, for example:

ff_log_example_05

© 2018-2024 Altova GmbH