Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Custom joblet for error logging

Hi All,

 

I am new to talend , and want to have some joblet which can be dropped and removed from job whenever user want it .Error logging joblet should be able to catch all types of logs (info,error ,fatal ,execption in a single log file ) in a job execution and then that joblet logs/output should be written to a log file say jobname.log.

Can anyone provide any inputs for the same that how these design can be achieved.

Thanks in advance.

Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi
Use a tLogCatcher in joblet to capture the Java error, and then link it to tMap where you can add/remove column, customize the column values, finally, write the logs to a file.
tLogCatcher--main--tMap--tFileOutputDelimited

Regards
Shong
Anonymous
Not applicable
Author

Will it capture all type of errors in job ,and how can we make it more explanatory ?

billimmer
Creator III
Creator III

To add to this, in your job, on the "job" tab you can set up a location for both logging to a text file and logging to a DB.  You can set this up so that it is the default for all jobs.  Then use components twarn and tdie in your jobs to write to your log.  Here's an example of how to set this up.  Notice that you can use context variables for fields....

 

0683p000009M9bw.png