cancel
Showing results for 
Search instead for 
Did you mean: 

Logging in Java class in user defined function

Former Member
0 Kudos

Hi,

When I do a system.out.println in a user defined function of mapping, why would the program not print anything when running in test ? Any settings needs to done

mad

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

This prinln statement writes the output to the console.

In case you need to check this output, without using a trace, you could copy the code to a file(.java)and exceute it at command prompt.

REgards,

Smitha.

Former Member
0 Kudos

System.out wont work there. You need to write something like this in your UDF.


AbstractTrace trace = container.getTrace();
...
trace.addDebugMessage("retrieved the value");

Regards,

Amol

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

I thing the System.out.println will be printed on the CONSOLE of the XI server and so, you cannot see the Output.

You can use the TRACE option, to print tany info that you want just like SOP.

<i>import com.sap.aii.mapping.api.AbstractTrace;

AbstractTrace trace= (AbstractTrace) param.get(StreamTransformationConstants.MAPPING_TRACE);

trace.addWarning("This is replacing SOP");</i>

Regards,

Bhavesh