Five Stars

[resolved] Logs from tLogCatcher to an email

Hi,
I have this job, as in the attached image.

My point is that I want to send the output of the logs to an email to get notified. 
I use in the tJavaRow:
globalMap.put("errorCode", input_row.message);
and in the tSendEmail:
"Hello, 
The input message is" +  (String)globalMap.get("errorCode")

However, the  (String)globalMap.get("errorCode") part always returns null, while the error message is different.
Could you help me with this?
Thanks a lot!
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: [resolved] Logs from tLogCatcher to an email

Hi 
tLogCatcher start to work only when a Java exception occurs during the job execution, the global variable will be null without error. In your job, make sure the 'die on error' option on tFileInputDelimited is checked, so that the Java exception will be thrown out and catched by tLogCatcher.
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
2 REPLIES
Community Manager

Re: [resolved] Logs from tLogCatcher to an email

Hi 
tLogCatcher start to work only when a Java exception occurs during the job execution, the global variable will be null without error. In your job, make sure the 'die on error' option on tFileInputDelimited is checked, so that the Java exception will be thrown out and catched by tLogCatcher.
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: [resolved] Logs from tLogCatcher to an email

You are right, thanks a lot Smiley Happy