[resolved] writing to a txt file

Highlighted
One Star

[resolved] writing to a txt file

I need a component to write messages/info to separate text files.
For example, writing error messages to a txt log file and warning to a different log file.
Can anyone help me please?

Accepted Solutions
One Star

Re: [resolved] writing to a txt file

Then you have not tried e.g. the tFileOutputDelimited or tFileOutputPositional
regards,
Walter

All Replies
One Star

Re: [resolved] writing to a txt file

Hi
Maybe what you need is tLogCatcher.
There are three options on this component: Catch Java Exception, Catch tDie, Catch tWarn.
If you want to do this separately, put two tLogCatcher in your job.
The first tLogCatcher: only check "Catch Java Exception". Then link it with output component.
The second tLogCatcher: only check "Catch tWarn". Then link it with output component.
I hope the error and warning you mentioned is Java Exception and tWarn..
Regards,
Pedro
One Star

Re: [resolved] writing to a txt file

Hi Pedro,
Thanks for your quick response!
But the problem is that if i use a tLogCatcher, i cannot specify the name of a txt file to which i want to output the warnings.
I want to be able to specify the txt file names and be able to output warnings to a txt file named warning.txt and output the errors to a txt file named errors.txt.
kind regards.
One Star

Re: [resolved] writing to a txt file

Hi
But you can.
tLogCatcher_1(only check "Catch Java Exception") --main-->tFileoutput_1(error.txt)
tLogCatcher_2(only check "Catch tWarn") --main-->tFileoutput_2(warning.txt)
Regards,
Pedro
One Star

Re: [resolved] writing to a txt file

can you please tell me which component i must use to output in the format .txt?
because among the tFileOutputXXXX components i have access to on talend, none output in the .txt format.
thanks.
One Star

Re: [resolved] writing to a txt file

Then you have not tried e.g. the tFileOutputDelimited or tFileOutputPositional
regards,
Walter
One Star

Re: [resolved] writing to a txt file

Thanks it works!

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch