I'm using tFileFetch POST to upload a multipart form file to the server. I can print the response to the console. Is it possible to get this response written to a tLogRow or a text file?
Asked
Active
Viewed 1,123 times
2 Answers
0
You can use tFixedFlowInput to generate some arbitrary data, so this should work for you. You can use it to emit the value that you are reading from globalMap.
tFixedFlowInput->tLogRow

user4704286
- 36
- 5
0
Assuming you could print the response to console, in that case you could tJava
to set the PrintStream
to file.
At the beginning of your job have a tJava
(you could set up tPreJob
and connect tJava
) with the code snippet as -
java.io.File file = new java.io.File("C:/Talend/"+jobName+"Log.txt");
java.io.PrintStream ps = new java.io.PrintStream(new java.io.FileOutputStream(file));
System.setOut(ps);
This would ensure that all the output/response would be written/redirected to file.

Abhishek
- 2,482
- 1
- 21
- 32