Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Empty log when running Talend in batch mode (Linux)

Hello,
I have built a talend job and deployed it on a linux machine.
a .sh script has been generated for me and when i run the script, the job does what's supposed to do.
But I have no log file, how to generate a log file for the job execution?
I added  > ./log_talend.log at the end of the command line, but the file log_talend.log is empty after running the job.

I've also activated all the log options in the job (see screenshot), but still the log file is empty.

 

Roland

0683p000009MZwD.png

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi

You need to capture the logs & stats using components (such as tLogCatcher, tStatCapture) in the job or activate the logs & stats in the job settings views, and output the logs&stats to a file.

Can you confirm the File path is set to a directory path on the machine where the job is executed?

 

Regards

Shong

 

JohnRMK
Creator II
Creator II

Hello,

 

you can add this in a tJava component on a pre-job (as first componenet)

 

java.io.File file = new java.io.File(jobName + "_" + TalendDate.formatDate("yyyy-MM-dd", TalendDate.getCurrentDate())+"_verbose");

java.io.PrintStream ps = new java.io.PrintStream(new java.io.FileOutputStream(file));

System.setOut(ps);

System.setErr(ps);

 

It will redirect all your logs console into file. You must enable the log to the console in project proprities