Print to log window

One Star

Print to log window

Is there a simple way to print output to the log window in the Java engine?
For example, in assigning context variable values, I would like to print the newly assigned variable to the log window.
How can this be accomplished?
Highlighted
One Star

Re: Print to log window

you can use one of the tJava components (tJava, tJavaFlex, tJavaRow) (usually I use tJavaRow, but there are times you need to use the other two)
and do a System.out.print(); or System.out.println(); command, with the information you want
example: I start a lot of my jobs with a tJava component with the following code, to print out the Job Name to the console
System.out.println("");
System.out.println("***" + jobName + "***");
System.out.println("");
Highlighted
One Star

Re: Print to log window

System.out.println("");


Works like a charm.
Thanks!

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog