Since it has been serveral years after this function has been asked for, has this implanted into generic Talend functions yet?
I have a project need to log every single error into a file, including some errors like ('unparsable date format' etc.) which tlogcatcher can not catch. I am sure I can use schema check to solve some of the cases. But if I can just write whatever shows in the console to a file will be easier way to do right?
Because it is a huge project that almost not realistic change every single subjob so I can only make change to the parent job, so the tRedirectOuput may be not the best choice for me.
Please let me know if there is any update. Thanks.
I have used tRedirectOutput component on my Talend job which is scheduled on windows but i am unable to redirect the output to .txt file.I have selected System.out option with append option.Please help me.
What's talend build version you are using? Is this custom component tRedirectOutput compatible with your current studio version?
Could you please stick to one topic:https://community.talend.com/t5/Design-and-Development/unable-to-log-output-from-tRedirectOutput-cus... so that we can pay individule attention to it.
I just came across this thread, I found this solution, which works perfectly for a single job.
Add the following code to a tJava at the beginning of your job. if you haven't created the log directory you can add tCreateTemporaryFile before the tJava and check the box "Remove file when execution is over". this will create the directory for you if you don't have it already.
java.io.File folder = new java.io.File("/var/");
java.io.File logFile = new java.io.File("/var/textLog.log");
java.io.PrintStream ps = new java.io.PrintStream(new java.io.FileOutputStream(logFile));
Thanks for sharing your solution with us.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema