• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Write custom errors in log file

#1 2012-04-26 17:18:11

oscarmsanz
Member
Registered: 1970-01-01
Posts: 78

Write custom errors in log file

Hello

My application in a directory see if I come some files. 6 and are expected to come if I come to report that not all files. This need excribirlo in a log file.

How I can do this?

I do

tFilelist ----------iterate------>tjava

I find that I have in tjava all files. then not as indicating that the number of files is not what I expected

Best regards,
Oscar Manso

Offline

#2 2012-04-27 05:53:01

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Write custom errors in log file

Hi

You can add a run-if trigger after tJava.
tFileList--Iterate-->tJava--Run-if-->tWarn
Then use tLogCatcher to record the error into log file.
tLogCatcher--main-->tFileOutputDelimited

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-04-27 09:30:58

oscarmsanz
Member
Registered: 1970-01-01
Posts: 78

Re: Write custom errors in log file

hi

The problem is that in the tjava I have more than one error that I must send a log. This log can be the use logCatcher or a personal

I had thought to save the errors as a arrayList in GlobalMap and then written ont line by error to a log file created by me.

Is this possible?

if possible, as is done

Regard
Oscar Manso

Offline

#4 2012-04-27 10:32:51

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Write custom errors in log file

Hi Oscar

I don't think this is an easy way.
If you put errors into arrayList, how do you pass them into tFileOutputDelimited?
You have to code too much.

I think saving all these errors into one context variable is more simple.
Use semicolon ';' to split errors.

Regards,
Pedro


Only Paranoid Survive.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Write custom errors in log file

Board footer

Powered by FluxBB