O'Reilly logo

Talend Open Studio Cookbook by Rick Barton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dumping the console output to a file from within a job

This recipe shows how you can dump all logging data to a file, while still running the job in the Studio. It is particularly useful when debugging large data sets.

Getting ready

Open the jo_cook_ch10_0090_consoleToFile job.

How to do it...

The steps for dumping console output to a file from within a job are as follows:

  1. Run the job and view the console output.
  2. Add the following code to tJava_1:
    // redirect the console output to a file from within studio
    System.setOut(new java.io.PrintStream(new java.io.BufferedOutputStream(new java.io.FileOutputStream(context.cookbookData+"outputData/chapter10/chapter10_jo_0090_consoleOut.txt"))));
  3. Run the job. You will see only the job's start and end messages.
  4. Open ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required