• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » share logs between parent and subjob

#1 2008-11-05 23:48:53

mmary
Member
Company: sqli
Registered: 2008-08-27
Posts: 41

share logs between parent and subjob

hello everybody,

my jobs shares some treatments so I've made some subjobs.
I would like to make a log file for each parent job, but only one.
Is there a way to do that? according with some answers, it seems that there is no way to throw errors to parents jobs.
I wouldn't like to make somes context variables. is it possible to send all errors from subjobs to console and redirect them to a log file?
best regards,

Matthieu

Offline

#2 2008-11-06 11:12:38

jeremie
Member
Registered: 2008-02-11
Posts: 151

Re: share logs between parent and subjob

Hi Matthieu,

See on the job setting view the stat&log.
you can chose the files for the job.

Jérémie


Consultant BI Open Source
FRANCE

Offline

#3 2008-11-06 11:38:36

mmary
Member
Company: sqli
Registered: 2008-08-27
Posts: 41

Re: share logs between parent and subjob

Hello Jeremie,

yes i have seen this settings but I would like to share the same log file from parent and many childrens jobs.
Some parents jobs use the same subjobs.
For the moment, I have a context variable which defined the context.log_folder file.
I would like that was the parent job which deifned the log filename. So I have think to pass a parameter for the subjob and this parameter was set by the parent job, but don"t think it's the better way to do that.
And I would like to know if there is a cleaner way smile
best regards

Offline

#4 2008-11-06 12:55:17

jeremie
Member
Registered: 2008-02-11
Posts: 151

Re: share logs between parent and subjob

Yes, it is.

best regards


Consultant BI Open Source
FRANCE

Offline

#5 2008-11-06 23:09:58

strpdsnk
Member
Registered: 2008-03-25
Posts: 328

Re: share logs between parent and subjob

I've taken to starting my jobs with a tJava that have this code, so the job name is printed to the output

Code:

System.out.println("");
System.out.println("***" + jobName + "***");
System.out.println("");

Offline

#6 2008-11-06 23:20:32

mmary
Member
Company: sqli
Registered: 2008-08-27
Posts: 41

Re: share logs between parent and subjob

and you redirect output from STDIN?

Offline

#7 2008-11-06 23:33:49

strpdsnk
Member
Registered: 2008-03-25
Posts: 328

Re: share logs between parent and subjob

Wait, I read it wrong, I didn't realize you want separate log files for each parent job.  Hmmm....

Yea, I think the best way is to set up all of your jobs is to set up all the stats & logs settings like in the pic and then passing the appropriate folder and file name from the parent to the child jobs


if [Bugtracker, feature 5108, open] add option to get console output from child job run via tRunJob gets implemented, then you could use a tJava and a System.out.println command to print the child job console output to your log file


Uploaded Images

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » share logs between parent and subjob

Board footer

Powered by FluxBB