Sending error logs in mail

Four Stars

Sending error logs in mail

Hi 

I want to send my runtime exceptions in mail.

I tried using SalesforcebulkExec --> tlogcatcher --> tsendmail

I am using this in tsendmail : ((String)globalMap.get("tLogCatcher_1_ERROR_MESSAGE"))

but I am getting null value as my exception result.

Can anybody help me ?

Forteen Stars

Re: Sending error logs in mail

You do not need connect component to tLogCatcher

You can drop tLogCatcher anywhere, in properties enable catch everything

If You want more information - add tDie and/or tWarn components into Your flow

 

Screen Shot 2018-02-03 at 4.37.10 PM.pngScreen Shot 2018-02-03 at 4.37.23 PM.pngScreen Shot 2018-02-03 at 4.39.17 PM.pngScreen Shot 2018-02-03 at 4.50.58 PM.png

 

Examples of messages (I use Slack and ELK, but it same logic for email):
Screen Shot 2018-02-03 at 4.53.20 PM.pngScreen Shot 2018-02-03 at 4.53.46 PM.png

-----------
Sixteen Stars TRF
Sixteen Stars

Re: Sending error logs in mail

Connect your SalesforceOutputBulkExec to a csv file using the reject flow.
Create a postJob subjob where you can get the number of records from this csv file and decide the next action as sending an email with the file as an attachment.

TRF
Four Stars

Re: Sending error logs in mail

Thanks !

Issue has been resolved Smiley Happy

Sixteen Stars TRF
Sixteen Stars

Re: Sending error logs in mail

Great!
Thank's to close the case by selecting the most usefull answer.
Kudos also accepted.

TRF

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog